# Packages
No description provided by the author
# Functions
AudienceValidator validates the "aud" claim.
ContentType sets the "cty" claim for a Header before signing.
ECDSAPrivateKey is an option to set a private key to the ECDSA-SHA algorithm.
ECDSAPublicKey is an option to set a public key to the ECDSA-SHA algorithm.
Ed25519PrivateKey is an option to set a private key to the Ed25519 algorithm.
Ed25519PublicKey is an option to set a public key to the Ed25519 algorithm.
ExpirationTimeValidator validates the "exp" claim.
Generate generates jwt map.
IDValidator validates the "jti" claim.
IssuedAtValidator validates the "iat" claim.
IssuerValidator validates the "iss" claim.
KeyID sets the "kid" claim for a Header before signing.
NewEd25519 creates a new algorithm using EdDSA and SHA-512.
NewES256 creates a new algorithm using ECDSA and SHA-256.
NewES384 creates a new algorithm using ECDSA and SHA-384.
NewES512 creates a new algorithm using ECDSA and SHA-512.
NewHS256 creates a new algorithm using HMAC and SHA-256.
NewHS384 creates a new algorithm using HMAC and SHA-384.
NewHS512 creates a new algorithm using HMAC and SHA-512.
NewPS256 creates a new algorithm using RSA-PSS and SHA-256.
NewPS384 creates a new algorithm using RSA-PSS and SHA-384.
NewPS512 creates a new algorithm using RSA-PSS and SHA-512.
NewRS256 creates a new algorithm using RSA and SHA-256.
NewRS384 creates a new algorithm using RSA and SHA-384.
NewRS512 creates a new algorithm using RSA and SHA-512.
None returns a dull, unsecured algorithm.
NotBeforeValidator validates the "nbf" claim.
NumericDate is a resolved Unix time.
Register register jwt with given config.
RSAPrivateKey is an option to set a private key to the RSA-SHA algorithm.
RSAPublicKey is an option to set a public key to the RSA-SHA algorithm.
Sign signs a payload with alg.
SubjectValidator validates the "sub" claim.
ValidateHeader checks whether the algorithm contained in the JOSE header is the same used by the algorithm.
ValidatePayload runs validators against a Payload after it's been decoded.
Verify verifies jwt token.
# Variables
ErrAlgValidation indicates an incoming JWT's "alg" field mismatches the Validator's.
ErrAudValidation is the error for an invalid "aud" claim.
ErrECDSANilPrivKey is the error for trying to sign a JWT with a nil private key.
ErrECDSANilPubKey is the error for trying to verify a JWT with a nil public key.
ErrECDSAVerification is the error for an invalid ECDSA signature.
ErrEd25519NilPrivKey is the error for trying to sign a JWT with a nil private key.
ErrEd25519NilPubKey is the error for trying to verify a JWT with a nil public key.
ErrEd25519Verification is the error for when verification with Ed25519 fails.
ErrExpValidation is the error for an invalid "exp" claim.
ErrHMACMissingKey is the error for trying to sign or verify a JWT with an empty key.
ErrHMACVerification is the error for an invalid signature.
ErrIatValidation is the error for an invalid "iat" claim.
ErrIssValidation is the error for an invalid "iss" claim.
ErrJtiValidation is the error for an invalid "jti" claim.
ErrMalformed indicates a token doesn't have a valid format, as per the RFC 7519.
ErrNbfValidation is the error for an invalid "nbf" claim.
ErrNotJSONObject is the error for when a JWT payload is not a JSON object.
ErrRSANilPrivKey is the error for trying to sign a JWT with a nil private key.
ErrRSANilPubKey is the error for trying to verify a JWT with a nil public key.
ErrRSAVerification is the error for an invalid RSA signature.
ErrSubValidation is the error for an invalid "sub" claim.
No description provided by the author
# Structs
Config jwt configuration.
ECDSASHA is an algorithm that uses ECDSA to sign SHA hashes.
Ed25519 is an algorithm that uses EdDSA to sign SHA-512 hashes.
Header is a JOSE header narrowed down to the JWT specification from RFC 7519.
HMACSHA is an algorithm that uses HMAC to sign SHA hashes.
Payload jwt payload.
RawToken is a representation of a parsed JWT string.
RSASHA is an algorithm that uses RSA to sign SHA hashes.
Time is the allowed format for time, as per the RFC 7519.
# Type aliases
Audience is a special claim that may either be a single string or an array of strings, as per the RFC 7519.
SignOption is a functional option for signing.
Validator is a function that validates a Payload pointer.
VerifyOption is a functional option for verifying.