fix(tokenExchange): use correct token type for userInfo requests #3336
+4
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This small changes fixes an issue in the token exchange flow. It explicitly sets the tokenType used for
GET /userinfo
toBearer
to be conform with the OIDC spec.What this PR does / why we need it
Without this change the tokenType would be set to either
urn:ietf:params:oauth:token-type:access_token
orurn:ietf:params:oauth:token-type:id_token
, which doesn't satisfy the OIDC spec.https://openid.net/specs/openid-connect-core-1_0.html#UserInfo (5.3.1)
Closes #3335