Use util.GetId()

This commit is contained in:
Yang Luo
2023-05-19 14:26:32 +08:00
parent de73ff0e60
commit 79bd58e0e6
8 changed files with 11 additions and 14 deletions

View File

@ -318,7 +318,7 @@ func GetCaptchaProviderByApplication(applicationId, isCurrentProvider, lang stri
continue
}
if provider.Provider.Category == "Captcha" {
return GetCaptchaProviderByOwnerName(fmt.Sprintf("%s/%s", provider.Provider.Owner, provider.Provider.Name), lang)
return GetCaptchaProviderByOwnerName(util.GetId(provider.Provider.Owner, provider.Provider.Name), lang)
}
}
return nil, nil

View File

@ -233,7 +233,7 @@ func generateJwtToken(application *Application, user *User, nonce string, scope
_, originBackend := getOriginFromHost(host)
name := util.GenerateId()
jti := fmt.Sprintf("%s/%s", application.Owner, name)
jti := util.GetId(application.Owner, name)
claims := Claims{
User: user,