File manager - Edit - /usr/local/CyberCP/lib/python3.10/site-packages/google/oauth2/__pycache__/challenges.cpython-310.pyc
Back
o �h�( � @ s� d Z ddlZddlZddlZddlZddlmZ ddlmZ ddlm Z ddl mZmZm Z dZdZd Zd d� ZG dd � d ejd�ZG dd� de�ZG dd� de�ZG dd� de�Zdd� e� e� e� fD �ZdS )z" Challenges for reauthentication. � N)�_helpers)� exceptions)�webauthn_handler_factory)�$AuthenticationExtensionsClientInputs� GetRequest�PublicKeyCredentialDescriptorzhttps://accounts.google.comzFPlease run `gcloud auth login` to complete reauthentication with SAML.i�� c C s t � | �S )z�Get password from user. Override this function with a different logic if you are using this library outside a CLI. Args: text (str): message for the password prompt. Returns: str: password string. )�getpass)�text� r �K/usr/local/CyberCP/lib/python3.10/site-packages/google/oauth2/challenges.py�get_user_password( s r c @ sB e Zd ZdZeejdd� ��Zeejdd� ��Zejdd� �Z dS ) �ReauthChallengez!Base class for reauth challenges.c C � t d��)z"Returns the name of the challenge.z!name property must be implemented��NotImplementedError��selfr r r �name: � zReauthChallenge.namec C r )zAReturns true if a challenge is supported locally on this machine.z0is_locally_eligible property must be implementedr r r r r �is_locally_eligible@ r z#ReauthChallenge.is_locally_eligiblec C r )ac Performs logic required to obtain credentials and returns it. Args: metadata (Mapping): challenge metadata returned in the 'challenges' field in the initial reauth request. Includes the 'challengeType' field and other challenge-specific fields. Returns: response that will be send to the reauth service as the content of the 'proposalResponse' field in the request body. Usually a dict with the keys specific to the challenge. For example, ``{'credential': password}`` for password challenge. z1obtain_challenge_input method must be implementedr �r �metadatar r r �obtain_challenge_inputF s z&ReauthChallenge.obtain_challenge_inputN) �__name__� __module__�__qualname__�__doc__�property�abc�abstractmethodr r r r r r r r 7 s r )� metaclassc @ s: e Zd ZdZedd� �Zedd� �Ze�e �dd� �Z dS ) �PasswordChallengez(Challenge that asks for user's password.c C � dS )N�PASSWORDr r r r r r [ � zPasswordChallenge.namec C r"