Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthToken ¶
func AuthToken() gin.HandlerFunc
AuthToken 用户验证中间件(Token) https://gin-gonic.com/docs/examples/custom-middleware/ https://github.com/dgrijalva/jwt-go 登录成功 生成令牌 token, err := common.GenerateToken("username") 用户授权 解析令牌 claims, err := common.ParseToken("token")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.