|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/site-packages/oauth2client/contrib/__pycache__/ |
U
O��g � @ s� d Z ddlZddlZddlZddlZddlmZ ddlmZ dZG dd� de �Z
G dd � d e
�ZG d
d� de
�ZdZ
G d
d� de�Zdd� ZG dd� dej�ZdS )z;OAuth 2.0 utitilies for Google Developer Shell environment.� N)�_helpers)�clientZDEVSHELL_CLIENT_PORTc @ s e Zd ZdZdS )�ErrorzErrors for this module.N��__name__�
__module__�__qualname__�__doc__� r
r
�J/opt/cppython/lib/python3.8/site-packages/oauth2client/contrib/devshell.pyr s r c @ s e Zd ZdZdS )�CommunicationErrorz9Errors for communication with the Developer Shell server.Nr r
r
r
r r ! s r c @ s e Zd ZdZdS )�NoDevshellServerz6Error when no Developer Shell server can be contacted.Nr r
r
r
r r
% s r
z[]c @ s e Zd ZdZdd� ZdS )�CredentialInfoResponsea� Credential information response from Developer Shell server.
The credential information response from Developer Shell socket is a
PBLite-formatted JSON array with fields encoded by their index in the
array:
* Index 0 - user email
* Index 1 - default project ID. None if the project context is not known.
* Index 2 - OAuth2 access token. None if there is no valid auth context.
* Index 3 - Seconds until the access token expires. None if not present.
c C s� t �|�}t|t�s$tdt|� ��t|�}|dkr<|d nd| _|dkrR|d nd| _|dkrh|d nd| _ |dkr~|d nd| _
dS )z4Initialize the response data from JSON PBLite array.zNot a list: r N� � � )�json�loads�
isinstance�list�
ValueError�str�len�
user_email�
project_id�access_token�
expires_in)�selfZjson_stringZpblZpbl_lenr
r
r �__init__<