D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
lib
/
python3.6
/
site-packages
/
oauthlib
/
oauth2
/
rfc6749
/
__pycache__
/
Filename :
errors.cpython-36.opt-1.pyc
back
Copy
3 ,�[B2 � @ s� d Z ddlmZ ddlZddlmZmZ G dd� de�ZG dd� de�Z G d d � d e�Z G dd� de�ZG d d� de�ZG dd� de�Z G dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d!d"� d"e�ZG d#d$� d$e�ZG d%d&� d&e�ZG d'd(� d(e�ZG d)d*� d*e�ZG d+d,� d,e�ZG d-d.� d.e�ZG d/d0� d0e�ZG d1d2� d2e�ZG d3d4� d4e�ZG d5d6� d6e�Z G d7d8� d8e�Z!G d9d:� d:e�Z"G d;d<� d<e�Z#G d=d>� d>e#�Z$G d?d@� d@e#�Z%G dAdB� dBe#�Z&G dCdD� dDe#�Z'G dEdF� dFe#�Z(G dGdH� dHe#�Z)G dIdJ� dJe#�Z*G dKdL� dLe#�Z+G dMdN� dNe#�Z,G dOdP� dPe�Z-G dQdR� dRe�Z.dUdSdT�Z/dS )Vz� oauthlib.oauth2.rfc6749.errors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error used both by OAuth 2 clients and providers to represent the spec defined error responses for all four core grant types. � )�unicode_literalsN)�add_params_to_uri� urlencodec sV e Zd ZdZdZdZd� fdd� Zdd� Zedd � �Z ed d� �Z edd � �Z� ZS )�OAuth2ErrorNi� � c s� |dk r|| _ d| j| j f }|r2|dt|� 7 }tt| �j|� || _|| _|rX|| _|r�|j | _ |j | _ |j| _|j| _|j | _ |j| _|s�|j| _n$d| _ d| _ d| _d| _d| _ d| _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 Nz(%s) %s� )�description�error�repr�superr �__init__�uri�state�status_codeZredirect_uriZ client_idZscopesZ response_type� response_modeZ grant_type)�selfr r r r Zrequest�message)� __class__� �/usr/lib/python3.6/errors.pyr s2 zOAuth2Error.__init__c C s | j dk}t|| j|�S )N�fragment)r r � twotuples)r r r r r r �in_uriI s zOAuth2Error.in_uric C sR d| j fg}| jr"|jd| jf� | jr8|jd| jf� | jrN|jd| jf� |S )Nr �error_description� error_urir )r r �appendr r )r r r r r r M s zOAuth2Error.twotuplesc C s t | j�S )N)r r )r r r r � urlencodedX s zOAuth2Error.urlencodedc C s t jt| j��S )N)�json�dumps�dictr )r r r r r \ s zOAuth2Error.json)NNNNN) �__name__� __module__�__qualname__r r r r r �propertyr r r � __classcell__r r )r r r s 3r c @ s e Zd ZdZdS )�TokenExpiredErrorZ token_expiredN)r r! r"