dev
This commit is contained in:
parent
07626c9d54
commit
76fd17c0f0
|
@ -26,7 +26,7 @@ func New() {
|
||||||
JwtSecretLen = len(env.MeshEnv.JwtSecretKey)
|
JwtSecretLen = len(env.MeshEnv.JwtSecretKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GenerateTokenAes(id uint, identity, client, role string, extend map[string]string) (string, error) {
|
func GenerateTokenAes(id uint, identity, client, role string, owner any, extend map[string]string) (string, error) {
|
||||||
if (JwtSecretLen == 16 || JwtSecretLen == 24 || JwtSecretLen == 32) == false {
|
if (JwtSecretLen == 16 || JwtSecretLen == 24 || JwtSecretLen == 32) == false {
|
||||||
return "", exception.ErrAuthSecret
|
return "", exception.ErrAuthSecret
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ func GenerateTokenAes(id uint, identity, client, role string, extend map[string]
|
||||||
ID: id,
|
ID: id,
|
||||||
Identity: identity,
|
Identity: identity,
|
||||||
Extend: extend,
|
Extend: extend,
|
||||||
Client: client,
|
Owner: owner,
|
||||||
Role: role,
|
Role: role,
|
||||||
ExpiresAt: expireTime.Unix(),
|
ExpiresAt: expireTime.Unix(),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue