This commit is contained in:
yanweidong 2024-03-15 15:18:54 +08:00
parent 07626c9d54
commit 76fd17c0f0
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ func New() {
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 {
return "", exception.ErrAuthSecret
}
@ -35,7 +35,7 @@ func GenerateTokenAes(id uint, identity, client, role string, extend map[string]
ID: id,
Identity: identity,
Extend: extend,
Client: client,
Owner: owner,
Role: role,
ExpiresAt: expireTime.Unix(),
}