Documentation ¶
Overview ¶
Package jwt provides a basic implementation of JSON Web Token as described in RFC 7519.
Index ¶
Constants ¶
View Source
const ( // HMAC Signer HS256 = "HS256" HS384 = "HS384" HS512 = "HS512" // RSA-PKCS family RS256 = "RS256" RS384 = "RS384" RS512 = "RS512" // RSA-PSS family PS256 = "PS256" PS384 = "PS384" PS512 = "PS512" // ECDSA Signer ES256 = "ES256" ES384 = "ES384" ES512 = "ES512" // None None = "none" )
View Source
const JWT = "jwt"
Variables ¶
View Source
var ( //ErrSignature is returned when the signature of token does not match the //expected signature generated with the secret key ErrSignature = errors.New("bad signature") //ErrMalformed is returned when the token does not have the expected format //as described in the RFC. ErrMalformed = errors.New("malformed token") //ErrInvalid is returned when the token hasn't the good issuer or when it has //expired or when the issue at is after the expiration time. ErrInvalid is //also returned when the payload can not be unmarshaled from the token. ErrInvalid = errors.New("invalid token") )
Common errors type
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.