HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /lib/python3/dist-packages/oauthlib/oauth2/rfc6749/endpoints/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/oauthlib/oauth2/rfc6749/endpoints/__pycache__/base.cpython-311.pyc
�

&�`"��~�dZddlZddlZddlmZmZmZmZmZm	Z	m
Z
eje��Z
Gd�d��Zd�ZdS)z�
oauthlib.oauth2.rfc6749
~~~~~~~~~~~~~~~~~~~~~~~

This module is an implementation of various logic needed
for consuming and providing OAuth 2.0 RFC6749.
�N�)�FatalClientError�InvalidClientError�InvalidRequestError�OAuth2Error�ServerError�TemporarilyUnavailableError�UnsupportedTokenTypeErrorc���eZdZd�Zed���Zejd���Zed���Zejd���Zed���Zejd���Zd�Z	d	�Z
d
�Zd�Zd�Z
d
S)�BaseEndpointc�0�d|_d|_d|_dS)NTF)�
_available�
_catch_errors�_valid_request_methods��selfs �H/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/endpoints/base.py�__init__zBaseEndpoint.__init__s�����"���&*��#�#�#�c��|jS�N�rrs r�valid_request_methodsz"BaseEndpoint.valid_request_methodss���*�*rc�0�|�d�|D��}||_dS)Nc�6�g|]}|�����S�)�upper)�.0�xs  r�
<listcomp>z6BaseEndpoint.valid_request_methods.<locals>.<listcomp>!s ��$N�$N�$N�1�Q�W�W�Y�Y�$N�$N�$Nrr)rrs  rrz"BaseEndpoint.valid_request_methodss+�� �,�$N�$N�8M�$N�$N�$N�!�&;��#�#�#rc��|jSr�rrs r�	availablezBaseEndpoint.available%s
����rc��||_dSrr")rr#s  rr#zBaseEndpoint.available)s
��#����rc��|jSr�rrs r�catch_errorszBaseEndpoint.catch_errors-s���!�!rc��||_dSrr&)rr's  rr'zBaseEndpoint.catch_errors1s��)����rc�6�|jst|d����dS)zRaise error on missing token.zMissing token parameter.��request�descriptionN)�tokenr�rr+s  r�_raise_on_missing_tokenz$BaseEndpoint._raise_on_missing_token5s9���}�	N�%�g�2L�N�N�N�
N�	N�	Nrc�^�|j�|��rG|j�|��s+t�d|��t|����dS|j�|j|��s+t�d|��t|����dS)z&Raise on failed client authentication.z!Client authentication failed, %r.�r+N)�request_validator�client_authentication_required�authenticate_client�log�debugr�authenticate_client_id�	client_idr.s  r�_raise_on_invalid_clientz%BaseEndpoint._raise_on_invalid_client:s����!�@�@��I�I�	6��)�=�=�g�F�F�
:��	�	�=�w�G�G�G�(��9�9�9�9�
:�
:��'�>�>�w�?P�RY�Z�Z�	6��I�I�9�7�C�C�C�$�W�5�5�5�5�	6�	6rc�t�|jr,|j|jvr |j|jvrt|����dSdSdS)zRaise on unsupported tokens.r1N)�token_type_hint�valid_token_types�supported_token_typesr
r.s  r�_raise_on_unsupported_tokenz(BaseEndpoint._raise_on_unsupported_tokenDsV���#�	=��#�t�'=�=�=��#�4�+E�E�E�+�G�<�<�<�<�	=�	=�=�=�E�Erc���|j�td���|j���|jvr+t	|d|j���z����dS)Nz0Configure "valid_request_methods" property firstzUnsupported request method %sr*)r�
ValueError�http_methodrrr.s  r�_raise_on_bad_methodz!BaseEndpoint._raise_on_bad_methodKsu���%�-��O�P�P�P���$�$�&�&�d�.H�H�H�%�g�3R�U\�Uh�Un�Un�Up�Up�3p�s�s�s�
s�I�Hrc�|�|j���dkr|jpd}|rt|d����dSdS)z/Raise if invalid POST request received
        �POST�z$URL query parameters are not allowedr*N)rAr�	uri_queryr)rr+�query_paramss   r�_raise_on_bad_post_requestz'BaseEndpoint._raise_on_bad_post_requestRsh����$�$�&�&�&�0�0�"�,�2��L��
`�)�'�7]�`�`�`�`�1�0�
`�
`rN)�__name__�
__module__�__qualname__r�propertyr�setterr#r'r/r9r>rBrHrrrrrs'������+�+�+�
�+�+��X�+��!�<�<�"�!�<�����X����$�$���$��"�"��X�"���*�*���*�N�N�N�
6�6�6�=�=�=�s�s�s�`�`�`�`�`rrc�F��tj����fd���}|S)Nc���|js5t��}t�d|z��i|jdfS|jrn	�||g|�Ri|��S#t$r�t$r�t$r?}t��}t�
d|z��i|jdfcYd}~Sd}~wwxYw�||g|�Ri|��S)Nz*Endpoint unavailable, ignoring request %s.i�z.Exception caught while processing request, %s.i�)r#r	r5�info�jsonr'rr�	Exceptionr�warning)�endpoint�uri�args�kwargs�e�error�fs      �r�wrapperz0catch_errors_and_unavailability.<locals>.wrapper\s&����!�	#�+�-�-�A��H�H�A�C�G�H�H�H��q�v�s�?�"�� �
	5�

+��q��3�8��8�8�8��8�8�8���
�
�
��#�
�
�
���
+�
+�
+�#�
�
�����D�q�H�J�J�J��5�:�s�*�*�*�*�*�*�*�����	
+�����1�X�s�4�T�4�4�4�V�4�4�4s�A�B0�14B+�%B0�+B0)�	functools�wraps)rZr[s` r�catch_errors_and_unavailabilityr^[s8����_�Q���5�5�5�5���5�(�Nr)�__doc__r\�logging�errorsrrrrrr	r
�	getLoggerrIr5rr^rrr�<module>rcs�������������������������������
�g���!�!��F`�F`�F`�F`�F`�F`�F`�F`�P����r