Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportRSAKeyOrDie ¶
func ExportRSAKeyOrDie(privKey *rsa.PrivateKey) (priv, pub string)
ExportRSAKeyOrDie exports rsa key object to a private/public strings. In case of fail panic is called.
func NewJWETokenManager ¶
func NewJWETokenManager(holder KeyHolder) authApi.TokenManager
Creates and returns default JWE token manager instance.
func ParseRSAKey ¶
func ParseRSAKey(privStr, pubStr string) (*rsa.PrivateKey, error)
ParseRSAKey parses private/public key strings and returns rsa key object or error.
Types ¶
type AdditionalAuthData ¶
AdditionalAuthData contains information required to validate token. It is integrity protected. For more information check: https://tools.ietf.org/html/rfc7516 (Chapter 2: Terminology)
type Claim ¶
type Claim string
Claim represent token claims used in AAD header. For more information check: https://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#rfc.section.4
type KeyHolder ¶
type KeyHolder interface { // Returns encrypter instance that can be used to encrypt data. Encrypter() jose.Encrypter // Returns encryption key that can be used to decrypt data. Key() *rsa.PrivateKey // Forces refresh of encryption key synchronized with kubernetes resource (secret). Refresh() }
KeyHolder is responsible for generating, storing and synchronizing encryption key used for token generation/decryption.
func NewRSAKeyHolder ¶
func NewRSAKeyHolder(synchronizer syncApi.Synchronizer) KeyHolder
NewRSAKeyHolder creates new KeyHolder instance.