Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MiddlewareValidate = validator.New()
中间件验证器
Functions ¶
func AuthToken ¶
func AuthToken(c *fiber.Ctx) error
用户授权中间件 https://docs.gofiber.io/guide/routing#middleware https://github.com/golang-jwt/jwt/v4 登录成功时生成令牌 token, err := common.GenerateToken("username") 用户授权时解析令牌 claims, err := common.ParseToken("token")
Types ¶
Click to show internal directories.
Click to hide internal directories.