&` dZddlmZmZGddeZGddeZGddeZGd d eZGd d eZ d S)z oauthlib.oauth1.rfc5849.errors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error used both by OAuth 1 clients and provicers to represent the spec defined error responses for all four core grant types. )add_params_to_uri urlencodec^eZdZdZdZ dfd ZdZedZedZ xZ S) OAuth1ErrorNc|p|j|_d|j|j}|r|dt|zz }t |||_||_dS)a description: A human-readable ASCII [USASCII] text providing additional information, used to assist the client developer in understanding the error that occurred. Values for the "error_description" parameter MUST NOT include characters outside the set x20-21 / x23-5B / x5D-7E. uri: A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. Values for the "error_uri" parameter MUST conform to the URI- Reference syntax, and thus MUST NOT include characters outside the set x21 / x23-5B / x5D-7E. state: A CSRF protection value received from the client. request: Oauthlib Request object z({}) {} N) descriptionformaterrorreprsuper__init__uri status_code)selfr rrrequestmessage __class__s @/usr/lib/python3/dist-packages/oauthlib/oauth1/rfc5849/errors.pyrzOAuth1Error.__init__sy*':$*:""4:t/?@@  + sT']]* *G !!!&c,t||jSN)r twotuples)rrs rin_urizOAuth1Error.in_uri-s dn555rcd|jfg}|jr|d|jf|jr|d|jf|S)Nr error_description error_uri)r r appendr)rr s rrzOAuth1Error.twotuples0s`4:&'   B LL-t/?@ A A A 8 2 LL+tx0 1 1 1 rc*t|jSr)rr)rs r urlencodedzOAuth1Error.urlencoded9s(((r)NNrN) __name__ __module__ __qualname__r r rrpropertyrr" __classcell__)rs@rrr s EK?B''''''<666X))X)))))rrceZdZdZdZdS)InsecureTransportErrorinsecure_transport_protocolz%Only HTTPS connections are permitted.N)r#r$r%r r rrr)r)>s )E9KKKrr)ceZdZdZdS)InvalidSignatureMethodErrorinvalid_signature_methodNr#r$r%r r+rrr-r-Cs &EEErr-ceZdZdZdS)InvalidRequestErrorinvalid_requestNr/r+rrr1r1Gs EEErr1ceZdZdZdS)InvalidClientErrorinvalid_clientNr/r+rrr4r4Ks EEErr4N) __doc__oauthlib.commonrr Exceptionrr)r-r1r4r+rrr9s988888880)0)0)0)0))0)0)0)f:::::[::: '''''+'''+r