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

OAuth2Client: use correct auth method for token introspection #662

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions authlib/oauth2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ def revoke_token(self, url, token=None, token_type_hint=None,

.. _`RFC7009`: https://tools.ietf.org/html/rfc7009
"""
if auth is None:
auth = self.client_auth(self.revocation_endpoint_auth_method)
return self._handle_token_hint(
'revoke_token_request', url,
token=token, token_type_hint=token_type_hint,
Expand All @@ -320,6 +322,8 @@ def introspect_token(self, url, token=None, token_type_hint=None,

.. _`RFC7662`: https://tools.ietf.org/html/rfc7662
"""
if auth is None:
auth = self.client_auth(self.token_endpoint_auth_method)
return self._handle_token_hint(
'introspect_token_request', url,
token=token, token_type_hint=token_type_hint,
Expand Down