Versions in this module Expand all Collapse all v0 v0.3.2 Mar 27, 2021 Changes in this version + var ErrKID = errors.New("the JWT has an invalid kid") + var ErrKIDNotFound = errors.New("the given key ID was not found in the JWKS") + var ErrMissingAssets = errors.New("required assets are missing to create a public key") + var ErrUnsupportedKeyType = errors.New("the JWT key type is unsupported") + type ErrorHandler func(err error) + type JSONKey struct + Curve string + Exponent string + ID string + Modulus string + X string + Y string + func (j *JSONKey) ECDSA() (publicKey *ecdsa.PublicKey, err error) + func (j *JSONKey) RSA() (publicKey *rsa.PublicKey, err error) + type JWKS struct + Keys map[string]*JSONKey + func Get(jwksURL string, options ...Options) (jwks *JWKS, err error) + func New(jwksBytes json.RawMessage) (jwks *JWKS, err error) + func (j *JWKS) EndBackground() + func (j *JWKS) KeyFunc(token *jwt.Token) (interface{}, error) + type Options struct + Client *http.Client + RefreshErrorHandler ErrorHandler + RefreshInterval *time.Duration + RefreshTimeout *time.Duration + RefreshUnknownKID *bool