Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rfc7009: return error if client validation fails #646

Merged
merged 1 commit into from May 20, 2024

Conversation

amCap1712
Copy link
Contributor

Section 2 of RFC 7009 says:

"The authorization server first validates the client credentials (in
case of a confidential client) and then verifies whether the token
was issued to the client making the revocation request. If this
validation fails, the request is refused and the client is informed
of the error by the authorization server as described below."

Accordingly, update the code to return an invalid_grant error if the token being revoked does not belong to client credentials supplied.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Other, please describe:

  • You consent that the copyright of your pull request source code belongs to Authlib's author.

[Section 2 of RFC 7009](https://datatracker.ietf.org/doc/html/rfc7009#section-2) says:

"The authorization server first validates the client credentials (in
 case of a confidential client) and then verifies whether the token
 was issued to the client making the revocation request.  If this
 validation fails, the request is refused and the client is informed
 of the error by the authorization server as described below."

Accordingly, update the code to return an invalid_grant error if the token being
revoked does not belong to client credentials supplied.
@lepture lepture merged commit 2a0b4eb into lepture:master May 20, 2024
11 checks passed
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.

None yet

2 participants