a \` @shdZddlmZmZGdddeZGdddeZGdddeZGd d d eZGd d 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 urlencodecsFeZdZdZdZd fdd ZddZedd Zed d Z Z S) OAuth1ErrorNcsL|p|j|_d|j|j}|r0|dt|7}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)selfrrrZrequestmessage __class__B/usr/lib/python3.9/site-packages/oauthlib/oauth1/rfc5849/errors.pyr s  zOAuth1Error.__init__cCs t||jSN)r twotuples)rrrrrin_uri-szOAuth1Error.in_uricCs<d|jfg}|jr"|d|jf|jr8|d|jf|S)Nr Zerror_descriptionZ error_uri)r rappendr)rr rrrr0s  zOAuth1Error.twotuplescCs t|jSr)rr)rrrr urlencoded9szOAuth1Error.urlencoded)NNrN) __name__ __module__ __qualname__r rr rpropertyrr __classcell__rrrrr s rc@seZdZdZdZdS)InsecureTransportErrorZinsecure_transport_protocolz%Only HTTPS connections are permitted.N)rrrr rrrrrr >sr c@seZdZdZdS)InvalidSignatureMethodErrorZinvalid_signature_methodNrrrr rrrrr!Csr!c@seZdZdZdS)InvalidRequestErrorZinvalid_requestNr"rrrrr#Gsr#c@seZdZdZdS)InvalidClientErrorZinvalid_clientNr"rrrrr$Ksr$N) __doc__Zoauthlib.commonrr Exceptionrr r!r#r$rrrrs 3