Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockCache ¶
func NewMockCache() *mockCache
Types ¶
type Cache ¶
type Cache interface { // Get an item from the cache // Returns the item or nil, and a bool indicating whether the key was found Get(k string) (interface{}, bool) // Add an item to the cache, replacing any existing item. Set(k string, x interface{}) }
func DefaultCache ¶
type DummySource ¶
type DummySource struct {
Jwks *jose.JSONWebKeySet
}
func NewDummySource ¶
func NewDummySource(jwks *jose.JSONWebKeySet) *DummySource
func (*DummySource) JSONWebKeySet ¶
func (s *DummySource) JSONWebKeySet() (*jose.JSONWebKeySet, error)
type JWKSClient ¶
type JWKSClient interface { GetKey(keyId string, use string) (*jose.JSONWebKey, error) GetEncryptionKey(keyId string) (*jose.JSONWebKey, error) GetSignatureKey(keyId string) (*jose.JSONWebKey, error) }
func NewClient ¶
func NewClient(source JWKSSource, cache Cache, refresh time.Duration) JWKSClient
func NewDefaultClient ¶
func NewDefaultClient(source JWKSSource, refresh time.Duration, ttl time.Duration) JWKSClient
Creates a new client with default cache implementation
func NewMockClient ¶
func NewMockClient(secret string) JWKSClient
type JWKSSource ¶
type JWKSSource interface {
JSONWebKeySet() (*jose.JSONWebKeySet, error)
}
type WebSource ¶
type WebSource struct {
// contains filtered or unexported fields
}
func NewWebSource ¶
func (*WebSource) JSONWebKeySet ¶
Click to show internal directories.
Click to hide internal directories.