Versions in this module Expand all Collapse all v0 v0.1.1 Feb 25, 2020 v0.1.0 Feb 25, 2020 Changes in this version + type JWTAuth struct + func New(store Storer, opts ...Option) *JWTAuth + func (a *JWTAuth) DestroyToken(ctx context.Context, tokenString string) error + func (a *JWTAuth) GenerateToken(ctx context.Context, userID string) (auth.TokenInfo, error) + func (a *JWTAuth) ParseUserID(ctx context.Context, tokenString string) (string, error) + func (a *JWTAuth) Release() error + type Option func(*options) + func SetExpired(expired int) Option + func SetKeyfunc(keyFunc jwt.Keyfunc) Option + func SetSigningKey(key interface{}) Option + func SetSigningMethod(method jwt.SigningMethod) Option + type Storer interface + Check func(ctx context.Context, tokenString string) (bool, error) + Close func() error + Set func(ctx context.Context, tokenString string, expiration time.Duration) error