Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidToken = errors.New("invalid token") ErrInvalidSignature = errors.New("signature is invalid") )
定义错误
Functions ¶
This section is empty.
Types ¶
type Auther ¶
type Auther interface { // 生成令牌 GenerateToken(ctx context.Context, mapClaims MapClaims) (TokenInfo, error) // 销毁令牌 DestroyToken(ctx context.Context, accessToken string) error // 解析用户 ParseUser(ctx context.Context, accessToken string) (*MapClaims, error) // 释放资源 Release() error }
Auther 认证接口
type MapClaims ¶
type MapClaims map[string]interface{}
func (*MapClaims) DecodeJSON ¶
func (*MapClaims) EncodeToJSON ¶
Click to show internal directories.
Click to hide internal directories.