From 1d0af9cf7b2d467227f49cddf11c709689aee504 Mon Sep 17 00:00:00 2001 From: Steve0x2a Date: Fri, 4 Mar 2022 22:57:31 +0800 Subject: [PATCH] fix: client_credentials' token miss some claims (#536) Signed-off-by: Steve0x2a --- object/token.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/object/token.go b/object/token.go index 7a48f2b2..fd711491 100644 --- a/object/token.go +++ b/object/token.go @@ -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 {