Repository navigation
fix(oauth): allow client_secret_post and none on the revocation endpoint - #1061
Open
ratomirjovanovic wants to merge 2 commits into
Open
ratomirjovanovic wants to merge 2 commits into
ratomirjovanovic wants to merge 2 commits into
Conversation
RevocationEndpoint inherited CLIENT_AUTH_METHODS = ["client_secret_basic"] from TokenEndpoint, so client_secret_post and public clients got invalid_client. Per RFC 7009 section 2.1 and section 5, public clients can revoke their tokens too. IntrospectionEndpoint keeps its default. Closes authlib#1057
…uth-methods # Conflicts: # tests/flask/test_oauth2/test_revocation_endpoint.py
This branch has not been deployed
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 #1057
RevocationEndpointnow setsCLIENT_AUTH_METHODS = ["client_secret_basic", "client_secret_post", "none"], as suggested in the issue.IntrospectionEndpointkeeps theTokenEndpointdefault. I documented the default and how to narrow it on the RFC 7009 page.New tests in
tests/flask/test_oauth2/test_revocation_endpoint.py: revoke withclient_secret_post, with a wrongclient_secret_postsecret (stillinvalid_client), with a public client, and with a subclass limited toclient_secret_basic. Theclient_secret_postand public client tests fail without the change.Updated with current main. Since ae75ea5 a confidential client can't use
nonehere, so the mixin caveat that was in this description no longer applies.Ran
uv run --all-groups pytest tests docs(2891 passed, 49 skipped) andprek run --all-files.