fix: client_credentials' token miss some claims (#536)

Signed-off-by: Steve0x2a <stevesough@gmail.com>
This commit is contained in:
Steve0x2a 2022-03-04 22:57:31 +08:00 committed by GitHub
parent 4d48517be9
commit 1d0af9cf7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -556,7 +556,9 @@ func GetClientCredentialsToken(application *Application, clientSecret string, sc
return nil, errors.New("error: invalid client_secret")
}
nullUser := &User{
Name: fmt.Sprintf("app/%s", application.Name),
Owner: application.Owner,
Id: application.GetId(),
Name: fmt.Sprintf("app/%s", application.Name),
}
accessToken, _, err := generateJwtToken(application, nullUser, "", scope, host)
if err != nil {