This commit is contained in:
zhaoxiaorong 2025-02-11 13:11:30 +08:00
parent 8d8ec866cd
commit fd967b8c1d
1 changed files with 1 additions and 2 deletions

View File

@ -27,8 +27,7 @@ func New(token string) {
}
func GenerateTokenAes(id uint, identity, client, role string, owner any, extend map[string]string) (string, error) {
JwtSecretLen = len(env.Runtime.JwtSecretKey)
if JwtSecretLen == 16 || JwtSecretLen == 24 || JwtSecretLen == 32 {
if (JwtSecretLen == 16 || JwtSecretLen == 24 || JwtSecretLen == 32) == false {
return "", errcode.ErrJWTSecretKey
}
expireTime := time.Now().Add(vars.JwtExpireDay)