File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -62,13 +62,18 @@ type MockGrantProvider struct {
6262 keyFile * KeyFile
6363}
6464
65- func (mgp * MockGrantProvider ) GetGrant (audience string , _ * ClientCredentialsFlowOptions ) (* AuthorizationGrant , error ) {
65+ func (mgp * MockGrantProvider ) GetGrant (audience string , opts * ClientCredentialsFlowOptions ) (* AuthorizationGrant , error ) {
66+ scopes := []string {mgp .keyFile .Scope }
67+ if opts != nil && len (opts .AdditionalScopes ) > 0 {
68+ scopes = append (scopes , opts .AdditionalScopes ... )
69+ }
6670 return & AuthorizationGrant {
6771 Type : GrantTypeClientCredentials ,
6872 Audience : audience ,
73+ ClientID : mgp .keyFile .ClientID ,
6974 ClientCredentials : mgp .keyFile ,
7075 TokenEndpoint : oidcEndpoints .TokenEndpoint ,
71- Scopes : [] string { mgp . keyFile . Scope } ,
76+ Scopes : scopes ,
7277 }, nil
7378}
7479
You can’t perform that action at this time.
0 commit comments