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 ¶ added in v0.0.60
GenerateSigningKeys generates a JSON Web Key Set for signing.
func GenerateSigningKeysAvailableAlgorithms ¶ added in v0.0.60
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 ¶ added in v0.0.586
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 ¶ added in v0.0.586
NewFetcherNext returns a new FetcherNext instance.
func (*FetcherNext) ResolveKey ¶ added in v0.0.586
func (f *FetcherNext) ResolveKey(ctx context.Context, locations string, modifiers ...FetcherNextOption) (jwk.Key, error)
func (*FetcherNext) ResolveKeyFromLocations ¶ added in v0.0.586
func (f *FetcherNext) ResolveKeyFromLocations(ctx context.Context, locations []string, modifiers ...FetcherNextOption) (jwk.Key, error)
type FetcherNextOption ¶ added in v0.0.586
type FetcherNextOption func(*fetcherNextOptions)
FetcherNextOption is a functional option for the FetcherNext.
func WithCacheEnabled ¶ added in v0.0.586
func WithCacheEnabled() FetcherNextOption
WithCacheEnabled enables the cache.
func WithCacheTTL ¶ added in v0.0.586
func WithCacheTTL(ttl time.Duration) FetcherNextOption
WithCacheTTL sets the cache TTL. If not set, the TTL is unlimited.
func WithForceKID ¶ added in v0.0.586
func WithForceKID(kid string) FetcherNextOption
WithForceKID forces the key ID to be used. Required when multiple JWK sets are configured.
func WithHTTPClient ¶ added in v0.0.586
func WithHTTPClient(c *retryablehttp.Client) FetcherNextOption
WithHTTPClient will use the given HTTP client to fetch the JSON Web Keys.