| Server IP : 138.197.107.151 / Your IP : 216.73.217.120 Web Server : Apache/2.4.58 (Ubuntu) System : Linux BloxBy-Builder 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : wpbetasites_mrakzqskir ( 1022) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/oauthlib/oauth2/rfc6749/endpoints/__pycache__/ |
Upload File : |
�
�c\ � �r � d Z ddlZddlmZ ddlmZ ddlmZmZ ej e
� Z G d� d e� Zy)
z�
oauthlib.oauth2.rfc6749.endpoint.revocation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An implementation of the OAuth 2 `Token Revocation`_ spec (draft 11).
.. _`Token Revocation`: https://tools.ietf.org/html/draft-ietf-oauth-revocation-11
� N)�Request� )�OAuth2Error� )�BaseEndpoint�catch_errors_and_unavailabilityc �@ � e Zd ZdZdZdZ dd�Ze d d�� Zd� Z y)
�RevocationEndpointz�Token revocation endpoint.
Endpoint used by authenticated clients to revoke access and refresh tokens.
Commonly this will be part of the Authorization Endpoint.
)�access_token�
refresh_token)�POSTNc �t � t j | � || _ |xs | j | _ || _ y )N)r �__init__�request_validator�valid_token_types�supported_token_types�enable_jsonp)�selfr r r s �N/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/endpoints/revocation.pyr zRevocationEndpoint.__init__ s6 � ����d�#�!2���!�;�T�%;�%;�
�"�(��� c �h � dddd�}t ||||�� } | j |� t j d|� | j j |j |j |� d
}| j r|j r|j dz }i |dfS # t $ r�}t j d||� |j
}| j r(|j rdj |j |� }|j |j � |||j fcY d }~S d }~ww xY w)
a� Revoke supplied access or refresh token.
The authorization server responds with HTTP status code 200 if the
token has been revoked successfully or if the client submitted an
invalid token.
Note: invalid tokens do not cause an error response since the client
cannot handle such an error in a reasonable way. Moreover, the purpose
of the revocation request, invalidating the particular token, is
already achieved.
The content of the response body is ignored by the client as all
necessary information is conveyed in the response code.
An invalid token type hint value is ignored by the authorization server
and does not influence the revocation response.
zapplication/jsonzno-storezno-cache)zContent-Typez
Cache-Control�Pragma)�http_method�body�headerszToken revocation valid for %r.z)Client error during validation of %r. %r.z{}({});N� z();�� )r �validate_revocation_request�log�debugr �jsonr �callback�format�updater �status_coder �revoke_token�token�token_type_hint) r �urir r r �resp_headers�request�e�
response_bodys r �create_revocation_responsez-RevocationEndpoint.create_revocation_response&