Implementation of OAuth 2.0 Token Introspection defined via `RFC7662`_. :param url: Introspection Endpoint, must be HTTPS. :param token: The token to be introspected. :param token_type_hint: The type of the token that to be revoked. It can be
(
self,
url,
token=None,
token_type_hint=None,
body=None,
auth=None,
headers=None,
**kwargs,
)
| 353 | ) |
| 354 | |
| 355 | def introspect_token( |
| 356 | self, |
| 357 | url, |
| 358 | token=None, |
| 359 | token_type_hint=None, |
| 360 | body=None, |
| 361 | auth=None, |
| 362 | headers=None, |
| 363 | **kwargs, |
| 364 | ): |
| 365 | """Implementation of OAuth 2.0 Token Introspection defined via `RFC7662`_. |
| 366 | |
| 367 | :param url: Introspection Endpoint, must be HTTPS. |
| 368 | :param token: The token to be introspected. |
| 369 | :param token_type_hint: The type of the token that to be revoked. |
| 370 | It can be "access_token" or "refresh_token". |
| 371 | :param body: Optional application/x-www-form-urlencoded body to add the |
| 372 | include in the token request. Prefer kwargs over body. |
| 373 | :param auth: An auth tuple or method as accepted by requests. |
| 374 | :param headers: Dict to default request headers with. |
| 375 | :return: Introspection Response |
| 376 | |
| 377 | .. _`RFC7662`: https://tools.ietf.org/html/rfc7662 |
| 378 | """ |
| 379 | if auth is None: |
| 380 | auth = self.client_auth(self.token_endpoint_auth_method) |
| 381 | return self._handle_token_hint( |
| 382 | "introspect_token_request", |
| 383 | url, |
| 384 | token=token, |
| 385 | token_type_hint=token_type_hint, |
| 386 | body=body, |
| 387 | auth=auth, |
| 388 | headers=headers, |
| 389 | **kwargs, |
| 390 | ) |
| 391 | |
| 392 | def register_compliance_hook(self, hook_type, hook): |
| 393 | """Register a hook for request/response tweaking. |
nothing calls this directly
no test coverage detected