Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e30d50845a | |||
| b4cd51a6dc |
@@ -30,7 +30,7 @@ func GenerateTokenAes(id uint, identity, client, role string, owner any, extend
|
|||||||
if !(JwtSecretLen == 16 || JwtSecretLen == 24 || JwtSecretLen == 32) {
|
if !(JwtSecretLen == 16 || JwtSecretLen == 24 || JwtSecretLen == 32) {
|
||||||
return "", errcode.ErrJWTSecretKey
|
return "", errcode.ErrJWTSecretKey
|
||||||
}
|
}
|
||||||
expireTime := time.Now().Add(vars.JwtExpireDay)
|
expireTime := time.Now().Add(vars.JwtExpire)
|
||||||
claims := types.JwtClaims{
|
claims := types.JwtClaims{
|
||||||
ID: id,
|
ID: id,
|
||||||
Identity: identity,
|
Identity: identity,
|
||||||
|
|||||||
@@ -5,4 +5,6 @@ const (
|
|||||||
NormalStatus = 1
|
NormalStatus = 1
|
||||||
// DisabledStatus .
|
// DisabledStatus .
|
||||||
DisabledStatus = -1
|
DisabledStatus = -1
|
||||||
|
|
||||||
|
OK string = "OK"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user