Versions in this module Expand all Collapse all v1 v1.0.2 May 24, 2022 v1.0.1 Dec 22, 2021 Changes in this version + var ErrGetKey = errors.Unauthorized("UNAUTHORIZED", "Can not get key while signing token") + var ErrMissingJwtToken = errors.Unauthorized("UNAUTHORIZED", "JWT token is missing") + var ErrMissingKeyFunc = errors.Unauthorized("UNAUTHORIZED", "keyFunc is missing") + var ErrNeedTokenProvider = errors.Unauthorized("UNAUTHORIZED", "Token provider is missing") + var ErrSignToken = errors.Unauthorized("UNAUTHORIZED", "Can not sign token.Is the key correct?") + var ErrTokenExpired = errors.Unauthorized("UNAUTHORIZED", "JWT token has expired") + var ErrTokenInvalid = errors.Unauthorized("UNAUTHORIZED", "Token is invalid") + var ErrTokenParseFail = errors.Unauthorized("UNAUTHORIZED", "Fail to parse JWT token ") + var ErrUnSupportSigningMethod = errors.Unauthorized("UNAUTHORIZED", "Wrong signing method") + var ErrWrongContext = errors.Unauthorized("UNAUTHORIZED", "Wrong context for middleware") + func Client(keyProvider jwt.Keyfunc, opts ...Option) middleware.Middleware + func FromContext(ctx context.Context) (token jwt.Claims, ok bool) + func NewContext(ctx context.Context, info jwt.Claims) context.Context + func Server(keyFunc jwt.Keyfunc, opts ...Option) middleware.Middleware + type Option func(*options) + func WithClaims(claims jwt.Claims) Option + func WithSigningMethod(method jwt.SigningMethod) Option