|
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/google/oauth2/__pycache__/ |
U
O��g� � @ sr d Z ddlZddlZddlZddlZddlmZ G dd� dej�ZG dd� de �Z
G dd � d ejd
�Zdd� Z
dS )
a' OAuth 2.0 Utilities.
This module provides implementations for various OAuth 2.0 utilities.
This includes `OAuth error handling`_ and
`Client authentication for OAuth flows`_.
OAuth error handling
--------------------
This will define interfaces for handling OAuth related error responses as
stated in `RFC 6749 section 5.2`_.
This will include a common function to convert these HTTP error responses to a
:class:`google.auth.exceptions.OAuthError` exception.
Client authentication for OAuth flows
-------------------------------------
We introduce an interface for defining client authentication credentials based
on `RFC 6749 section 2.3.1`_. This will expose the following
capabilities:
* Ability to support basic authentication via request header.
* Ability to support bearer token authentication via request header.
* Ability to support client ID / secret authentication via request body.
.. _RFC 6749 section 2.3.1: https://tools.ietf.org/html/rfc6749#section-2.3.1
.. _RFC 6749 section 5.2: https://tools.ietf.org/html/rfc6749#section-5.2
� N)�
exceptionsc @ s e Zd ZdZdZdS )�ClientAuthType� � N)�__name__�
__module__�__qualname__�basic�request_body� r r �@/opt/cppython/lib/python3.8/site-packages/google/oauth2/utils.pyr 5 s r c @ s e Zd ZdZddd�ZdS )�ClientAuthenticationz�Defines the client authentication credentials for basic and request-body
types based on https://tools.ietf.org/html/rfc6749#section-2.3.1.
Nc C s || _ || _|| _dS )a� Instantiates a client authentication object containing the client ID
and secret credentials for basic and response-body auth.
Args:
client_auth_type (google.oauth2.oauth_utils.ClientAuthType): The
client authentication type.
client_id (str): The client ID.
client_secret (Optional[str]): The client secret.
N)�client_auth_type� client_id�
client_secret)�selfr r r r r r �__init__? s
zClientAuthentication.__init__)N)r r r �__doc__r r r r r r
: s r
c s>