Documentation ¶
Index ¶
- type JWTAuth
- func (a *JWTAuth) DestroyToken(ctx context.Context, tokenString string) error
- func (a *JWTAuth) GenerateToken(ctx context.Context, mapClaims auth.MapClaims) (auth.TokenInfo, error)
- func (a *JWTAuth) ParseUser(ctx context.Context, tokenString string) (*auth.MapClaims, error)
- func (a *JWTAuth) Release() error
- type Option
- type Storer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTAuth ¶
type JWTAuth struct {
// contains filtered or unexported fields
}
JWTAuth jwt认证
func (*JWTAuth) DestroyToken ¶
DestroyToken 销毁令牌
func (*JWTAuth) GenerateToken ¶
func (a *JWTAuth) GenerateToken(ctx context.Context, mapClaims auth.MapClaims) (auth.TokenInfo, error)
GenerateToken 生成令牌
type Option ¶
type Option func(*options)
Option 定义参数项
func SetSigningMethod ¶
func SetSigningMethod(method jwt.SigningMethod) Option
SetSigningMethod 设定签名方式
Click to show internal directories.
Click to hide internal directories.