PHP WebShell

Текущая директория: /usr/lib/python3/dist-packages/oauthlib/oauth1/rfc5849/endpoints/__pycache__

Просмотр файла: signature_only.cpython-310.pyc

o

���a��@sBdZddlZddlmZddlmZe�e�ZGdd�de�Z	dS)	z�
oauthlib.oauth1.rfc5849.endpoints.signature_only
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This module is an implementation of the signing logic of OAuth 1.0 RFC 5849.
�N�)�errors�)�BaseEndpointc@seZdZdZ		ddd�ZdS)�SignatureOnlyEndpointz>An endpoint only responsible for verifying an oauth signature.�GETNc

CsBz
|�||||�}Wntjy%}zt�d|�WYd}~dSd}~wwz|�|�|�|�WntjyP}zt�d|�d|fWYd}~Sd}~ww|j�|j	|j
|j|�sft�d�d|fS|j�
|j	|�}|su|jj|_	|�|�}||jd<||jd<t||f�}	|	s�t�d�t�d	|�t�d
|�|	|fS)a�Validate a signed OAuth request.

        :param uri: The full URI of the token request.
        :param http_method: A valid HTTP verb, i.e. GET, POST, PUT, HEAD, etc.
        :param body: The request body as a string.
        :param headers: The request headers as a dict.
        :returns: A tuple of 2 elements.
                  1. True if valid, False otherwise.
                  2. An oauthlib.common.Request object.
        z.Exception caught while validating request, %s.N)FNFz.[Failure] verification failed: timestamp/nonce�client�	signaturez&[Failure] request verification failed.zValid client: %szValid signature: %s)�_create_requestr�OAuth1Error�log�info�_check_transport_security�_check_mandatory_parameters�request_validator�validate_timestamp_and_nonce�
client_key�	timestamp�nonce�debug�validate_client_key�dummy_client�_check_signature�
validator_log�all)
�self�uri�http_method�body�headers�request�err�valid_client�valid_signature�v�r%�R/usr/lib/python3/dist-packages/oauthlib/oauth1/rfc5849/endpoints/signature_only.py�validate_requestsL���
����
	�




z&SignatureOnlyEndpoint.validate_request)rNN)�__name__�
__module__�__qualname__�__doc__r'r%r%r%r&rs
�r)
r+�logging�r�baser�	getLoggerr(rrr%r%r%r&�<module>s


Выполнить команду


Для локальной разработки. Не используйте в интернете!