Documentation ¶
Index ¶
- func GenerateToken(method jwt.SigningMethod, subject string, id int64, secret string, ...) (string, error)
- func GenerateTokenByLong(method jwt.SigningMethod, id int64, secret string, expired int64) (string, error)
- func GenerateTokenByString(method jwt.SigningMethod, subject string, secret string, expired int64) (string, error)
- func ParseToken(tokenStr string, secret string) (*jwt.RegisteredClaims, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
func GenerateToken(method jwt.SigningMethod, subject string, id int64, secret string, expired int64) (string, error)
GenerateToken 生成token
func GenerateTokenByLong ¶
func GenerateTokenByLong(method jwt.SigningMethod, id int64, secret string, expired int64) (string, error)
GenerateTokenByLong 生成token
func GenerateTokenByString ¶
func GenerateTokenByString(method jwt.SigningMethod, subject string, secret string, expired int64) (string, error)
GenerateTokenByString 生成token
func ParseToken ¶
ParseToken 解析token
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.