Skip to content

Commit 9043b19

Browse files
committed
Back out using verifyToken
1 parent c4b014b commit 9043b19

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/oidc/client/client.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,14 @@ func (c *client) GetTokenByClientCredentials(ctx context.Context, in GetTokenByC
176176
EndpointParams: in.EndpointParams,
177177
AuthStyle: oauth2.AuthStyleInHeader,
178178
}
179-
source := config.TokenSource(ctx)
180-
token, err := source.Token()
179+
token, err := config.Token(ctx)
181180
if err != nil {
182181
return nil, fmt.Errorf("could not acquire token: %w", err)
183182
}
184-
return c.verifyToken(ctx, token, "")
183+
return &oidc.TokenSet{
184+
IDToken: token.AccessToken,
185+
RefreshToken: token.RefreshToken,
186+
}, nil
185187
}
186188

187189
// GetDeviceAuthorization initializes the device authorization code challenge

0 commit comments

Comments
 (0)