&` fdZddlZddlmZddlmZejeZGddeZ 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) BaseEndpointceZdZdZ ddZdS)SignatureOnlyEndpointz>An endpoint only responsible for verifying an oauth signature.GETNc |||||}n:#tj$r(}td|zYd}~dSd}~wwxYw ||||n=#tj$r+}td|zd|fcYd}~Sd}~wwxYw|j|j |j |j |st dd|fS|j |j |}|s|jj|_ ||}||jd<||jd<t#||f} | sPtdtd |td || |fS) aValidate 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/nonceclient signaturez&[Failure] request verification failed.zValid client: %szValid signature: %s)_create_requestr OAuth1Errorloginfo_check_transport_security_check_mandatory_parametersrequest_validatorvalidate_timestamp_and_nonce client_key timestampnoncedebugvalidate_client_key dummy_client_check_signature validator_logall) selfuri http_methodbodyheadersrequesterr valid_clientvalid_signaturevs R/usr/lib/python3/dist-packages/oauthlib/oauth1/rfc5849/endpoints/signature_only.pyvalidate_requestz&SignatureOnlyEndpoint.validate_requests **3 T7KKGG!    HH@3F H H H;;;;;   "  * *7 3 3 3  , ,W 5 5 5 5! " " " HH@3F H H H'> ! ! ! ! ! ! " %BB"G$5w}gOO " IIF G G G'> !-AA  ))  E!%!7!DG //88+7h'-<k* / 0 0 = HH= > > > HH' 6 6 6 HH*O < < <'zs2AA  A*BB; B60B;6B;)r NN)__name__ __module__ __qualname____doc__r)r(rrs4HH05,0======r/r) r-loggingrbaser getLoggerr*rrr.r/r(r4sg!!AAAAALAAAAAr/