@@ -289,7 +289,7 @@ func (b *jwtAuthBackend) pathCallback(ctx context.Context, req *logical.Request,
289
289
}
290
290
291
291
// Verify the ID token received from the authentication response.
292
- rawToken = oidc .IDToken (oidcReq .idToken )
292
+ rawToken : = oidc .IDToken (oidcReq .idToken )
293
293
if _ , err := provider .VerifyIDToken (ctx , rawToken , oidcReq ); err != nil {
294
294
return logical .ErrorResponse ("%s %s" , errTokenVerification , err .Error ()), nil
295
295
}
@@ -352,15 +352,7 @@ func (b *jwtAuthBackend) processToken(ctx context.Context, config *jwtConfig, oi
352
352
return loginFailedResponse (useHttp , "sub claim does not match bound subject" ), nil
353
353
}
354
354
355
- // Set the token source for the access token if it's available. It will only
356
- // be available for the authorization code flow (oidc_response_types=code).
357
- // The access token will be used for fetching additional user and group info.
358
- var tokenSource oauth2.TokenSource
359
- if token != nil {
360
- tokenSource = token .StaticTokenSource ()
361
- }
362
-
363
- // If we have a token, attempt to fetch information from the /userinfo endpoint
355
+ // If we have a tokenSource, attempt to fetch information from the /userinfo endpoint
364
356
// and merge it with the existing claims data. A failure to fetch additional information
365
357
// from this endpoint will not invalidate the authorization flow.
366
358
if tokenSource != nil {
0 commit comments