update
This commit is contained in:
@ -41,11 +41,6 @@ func NewManager(secret string, expireHours int) *Manager {
|
||||
}
|
||||
}
|
||||
|
||||
// 注:Generate(签发令牌)已随注册 / 登录接口一并移除——当前服务没有任何签发入口,
|
||||
// 只保留 Parse 供 middleware.Auth 校验既有令牌。
|
||||
// 将来接入登录时恢复:构造 jwtlib.MapClaims{"uid","username","email","exp"},
|
||||
// 再用 jwtlib.NewWithClaims(jwtlib.SigningMethodHS256, claims).SignedString(m.secret) 签名即可。
|
||||
|
||||
// Generate 签发令牌(登录成功后调用)。
|
||||
//
|
||||
// 构造与 Parse 对称的 Claims(uid / username / email / tier / exp),用 HS256 签名。
|
||||
|
||||
Reference in New Issue
Block a user