Versions in this module Expand all Collapse all v1 v1.0.0 Apr 15, 2015 Changes in this version + var ErrInvalidAlgorithm = errors.New("jwt: invalid algorithm") + var ErrInvalidAudience = errors.New("jwt: invalid audience") + var ErrInvalidIssuer = errors.New("jwt: invalid issuer") + var ErrInvalidSubject = errors.New("jwt: invalid subject") + var ErrInvalidToken = errors.New("jwt: invalid token") + var ErrNoKeyProvided = errors.New("jwt: no key provided") + var ErrNonExistantKey = errors.New("jwt: non-existant key") + var ErrNoneAlgorithmWithSecret = errors.New("jwt: none algorithm with secret") + var ErrReservedClaim = errors.New("jwt: reserved claim used") + var ErrTokenExpired = errors.New("jwt: token expired") + var ErrTokenNotValidYet = errors.New("jwt: token not valid yet") + var ErrUnsupportedAlgorithm = errors.New("jwt: unsupported algorithm") + var ErrUnsupportedTokenType = errors.New("jwt: unsupported token type") + func KeyLookupCallback(callback func(string) (Algorithm, interface{})) + type Algorithm string + const ES256 + const ES384 + const ES512 + const HS256 + const HS384 + const HS512 + const None + const RS256 + const RS384 + const RS512 + type Signer func(string, interface{}) (string, error) + type Token struct + Algorithm Algorithm + Audience string + Claims map[string]interface{} + Expires time.Time + IssuedAt time.Time + Issuer string + KeyID string + NotBefore time.Time + Subject string + Type Type + func DecodeToken(token string, algorithm Algorithm, secret interface{}) (*Token, error) + func NewToken() *Token + func (t Token) Expired() bool + func (t Token) Sign(secret interface{}) (string, error) + func (t Token) Valid() bool + func (t Token) Verify(issuer, subject, audience string) error + type Type string + const JWT + type Verifier func(string, string, interface{}) error