Documentation ¶
Overview ¶
Package jwks provides helpers for working with json key sets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyProvider ¶
type KeyProvider interface { // allow users to stop any background process in a key provider. io.Closer // LookupKey should return a public key based on the given key ID. Return an error if not // found or any other error. LookupKey(ctx context.Context, kid, alg string) (interface{}, error) // Fetch returns the full KeySet as a cloned keyset, any modifcations are only applied locally. Fetch(ctx context.Context) (KeySet, error) }
KeyProvider provides an interface to lookup keys based on a key ID. Providers may have a background process to refresh keys and allows it to be closed.
func NewCachingOIDCJWKKeyProvider ¶
func NewCachingOIDCJWKKeyProvider(ctx context.Context, issuer string) (KeyProvider, error)
NewCachingOIDCJWKKeyProvider creates a CachingKeyProvider based on the issuer url base domain and starts the auto refresh. Call CachingKeyProvider.Stop() to stop any background goroutines.
func NewStaticJWKKeyProvider ¶
func NewStaticJWKKeyProvider(keyset KeySet) KeyProvider
NewStaticJWKKeyProvider create static key provider based on the keyset given.
Click to show internal directories.
Click to hide internal directories.