Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnableToFindKeyID = errors.New("specified JWK kid can not be found in the JWK sets")
Functions ¶
func GenerateSigningKeys ¶
GenerateSigningKeys generates a JSON Web Key Set for signing.
func GenerateSigningKeysAvailableAlgorithms ¶
func GenerateSigningKeysAvailableAlgorithms() []string
GenerateSigningKeysAvailableAlgorithms lists available algorithms that are supported by GenerateSigningKeys.
Types ¶
type Fetcher ¶
Fetcher is a small helper for fetching JSON Web Keys from remote endpoints.
DEPRECATED: Use FetcherNext instead.
func NewFetcher ¶
NewFetcher returns a new fetcher that can download JSON Web Keys from remote endpoints.
DEPRECATED: Use FetcherNext instead.
type FetcherNext ¶
type FetcherNext struct {
// contains filtered or unexported fields
}
FetcherNext is a JWK fetcher that can be used to fetch JWKs from multiple locations.
func NewFetcherNext ¶
NewFetcherNext returns a new FetcherNext instance.
func (*FetcherNext) ResolveKey ¶
func (f *FetcherNext) ResolveKey(ctx context.Context, locations string, modifiers ...FetcherNextOption) (jwk.Key, error)
func (*FetcherNext) ResolveKeyFromLocations ¶
func (f *FetcherNext) ResolveKeyFromLocations(ctx context.Context, locations []string, modifiers ...FetcherNextOption) (jwk.Key, error)
type FetcherNextOption ¶
type FetcherNextOption func(*fetcherNextOptions)
FetcherNextOption is a functional option for the FetcherNext.
func WithCacheEnabled ¶
func WithCacheEnabled() FetcherNextOption
WithCacheEnabled enables the cache.
func WithCacheTTL ¶
func WithCacheTTL(ttl time.Duration) FetcherNextOption
WithCacheTTL sets the cache TTL. If not set, the TTL is unlimited.
func WithForceKID ¶
func WithForceKID(kid string) FetcherNextOption
WithForceKID forces the key ID to be used. Required when multiple JWK sets are configured.
func WithHTTPClient ¶
func WithHTTPClient(c *retryablehttp.Client) FetcherNextOption
WithHTTPClient will use the given HTTP client to fetch the JSON Web Keys.