package
1.3.6
Repository: https://github.com/nytimes/gizmo.git
Documentation: pkg.go.dev

# Packages

# Functions

GetAuthorizationToken will pull the Authorization header from the given request and attempt to retrieve the token within it.
NewPublicKeySetFromJSON will accept a JSON payload in the format of the JSONKeyResponse and parse it into a PublicKeySet.
NewPublicKeySetFromURL will attempt to fetch a JWKS from the given URL and parse it into a PublicKeySet.
NewReusePublicKeySource is a wrapper around PublicKeySources to only fetch a new key set once the current key cache has expired.
NewVerifier returns a genric Verifier that will use the given funcs and key source.

# Variables

ErrBadCreds will always be wrapped when a user's credentials are unexpected.
TimeNow is used internally to determine the current time.

# Structs

JSONKey represents a public or private key in JWK format.
JSONKeyResponse represents a JWK Set object.
PublicKeySet contains a set of keys acquired from a JWKS that has an expiration.
Verifier is a generic tool for verifying JWT tokens.

# Interfaces

ClaimSetter is an interface for all incoming claims to implement.
PublicKeySource is to be used by servers who need to acquire public key sets for verifying inbound request's JWTs.

# Type aliases

ClaimsDecoderFunc will expect to convert a JSON payload into the appropriate claims type.
VerifyFunc will be called by the Verify if all other checks on the token pass.