MCPcopy Index your code
hub / github.com/authlib/authlib / revoke_token

Method revoke_token

authlib/oauth2/client.py:318–353  ·  view source on GitHub ↗

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,
    )

Source from the content-addressed store, hash-verified

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,

Callers 3

test_revoke_tokenFunction · 0.45
test_revoke_tokenFunction · 0.45
test_revoke_tokenFunction · 0.45

Calls 2

client_authMethod · 0.95
_handle_token_hintMethod · 0.95

Tested by 3

test_revoke_tokenFunction · 0.36
test_revoke_tokenFunction · 0.36
test_revoke_tokenFunction · 0.36