Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
func CreateToken(id CustomClaims, key ...interface{}) (token string, err error)
CreateToken CreateToken
Types ¶
type CustomClaims ¶
CustomClaims CustomClaims
type TokenParser ¶
type TokenParser struct {
// contains filtered or unexported fields
}
TokenParser TokenParser
func NewTokenParser ¶
func NewTokenParser(opts ...ParseOption) *TokenParser
NewTokenParser 新的TokenParser
func (*TokenParser) CreateToken ¶
func (tp *TokenParser) CreateToken(secret, prevSecret string) (token *jwt.Token, err error)
CreateToken 生成Token
func (*TokenParser) ParseToken ¶
func (tp *TokenParser) ParseToken(secret, prevSecret string) (token *jwt.Token, err error)
ParseToken 格式化Token
Click to show internal directories.
Click to hide internal directories.