feat(oauth2): support form_post response mode on the authorization code and implicit grants - #927
Open
ChrisJr404 wants to merge 1 commit into
Open
feat(oauth2): support form_post response mode on the authorization code and implicit grants#927ChrisJr404 wants to merge 1 commit into
ChrisJr404 wants to merge 1 commit into
Conversation
…de and implicit grants
Member
|
Thank you for your contribution, you erroneously comited pip-cache/http-v2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #816.
This brings the
form_postresponse mode to the plain OAuth 2.0 authorization code and implicit grants. The OIDC grants already supported it throughcreate_response_mode_response, so instead of duplicating anything I moved that helper down intorfc6749/parameters.pyand had both the OAuth2 and OIDC grants use it.querystays the default for the code grant andfragmentfor implicit, so existing responses are byte for byte unchanged. A client only gets a form post when it asks forresponse_mode=form_post.An unknown
response_modevalue is now rejected with aninvalid_requesterror. While wiring that up I noticed the helper's error message contained a double quote, which theerror_descriptionvalidator forbids, so it would have raised a ValueError instead of the intended OAuth error. I switched it to single quotes.Added tests for both grants and a changelog entry.