Revoke token method defined via `RFC7009`_. :param url: Revoke Token endpoint, must be HTTPS. :param token: The token to be revoked. :param token_type_hint: The type of the token that to be revoked. It can be "access_token" or "refresh_token".
(
self,
url,
token=None,
token_type_hint=None,
body=None,
auth=None,
headers=None,
**kwargs,
)
| 316 | return True |
| 317 | |
| 318 | def revoke_token( |
| 319 | self, |
| 320 | url, |
| 321 | token=None, |
| 322 | token_type_hint=None, |
| 323 | body=None, |
| 324 | auth=None, |
| 325 | headers=None, |
| 326 | **kwargs, |
| 327 | ): |
| 328 | """Revoke token method defined via `RFC7009`_. |
| 329 | |
| 330 | :param url: Revoke Token endpoint, must be HTTPS. |
| 331 | :param token: The token to be revoked. |
| 332 | :param token_type_hint: The type of the token that to be revoked. |
| 333 | It can be "access_token" or "refresh_token". |
| 334 | :param body: Optional application/x-www-form-urlencoded body to add the |
| 335 | include in the token request. Prefer kwargs over body. |
| 336 | :param auth: An auth tuple or method as accepted by requests. |
| 337 | :param headers: Dict to default request headers with. |
| 338 | :return: Revocation Response |
| 339 | |
| 340 | .. _`RFC7009`: https://tools.ietf.org/html/rfc7009 |
| 341 | """ |
| 342 | if auth is None: |
| 343 | auth = self.client_auth(self.revocation_endpoint_auth_method) |
| 344 | return self._handle_token_hint( |
| 345 | "revoke_token_request", |
| 346 | url, |
| 347 | token=token, |
| 348 | token_type_hint=token_type_hint, |
| 349 | body=body, |
| 350 | auth=auth, |
| 351 | headers=headers, |
| 352 | **kwargs, |
| 353 | ) |
| 354 | |
| 355 | def introspect_token( |
| 356 | self, |