Skip to content

Handle missing token exchange requested_token_type parameter#18

Merged
rohe merged 1 commit intoIdentityPython:developfrom
ctriant:fix-requested-token-type
May 14, 2022
Merged

Handle missing token exchange requested_token_type parameter#18
rohe merged 1 commit intoIdentityPython:developfrom
ctriant:fix-requested-token-type

Conversation

@ctriant
Copy link
Copy Markdown
Contributor

@ctriant ctriant commented May 13, 2022

According to OAuth 2.0 Token Exchange the requested_token_type of a Token Exchange request is optional. In the case where this parameter is missing from the request, a KeyError is raised.

To solve this issue, this MR introduces a mandatory configuration parameter default_requested_token_type for the TokenExchangeHelper configuration.

@ctriant
Copy link
Copy Markdown
Contributor Author

ctriant commented May 13, 2022

Should we enforce that default_requested_token_type is a permitted token type according to requested_token_types_supported, or should we push the responsibility to the user? @rohe

@rohe
Copy link
Copy Markdown
Contributor

rohe commented May 13, 2022

Pushing responsibility to the user is almost never a good thing.

@rohe rohe merged commit c9d86fa into IdentityPython:develop May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants