File manager - Edit - /usr/local/CyberCP/lib/python3.10/site-packages/google/oauth2/__pycache__/reauth.cpython-310.pyc
Back
o �h-2 � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ dZdZ d Z d ZdZdZ d ZdZdZdd� Z ddd�Zdd� Zdd� Zdd� Z ddd�Z d dd�ZdS )!a� A module that provides functions for handling rapt authentication. Reauth is a process of obtaining additional authentication (such as password, security token, etc.) while refreshing OAuth 2.0 credentials for a user. Credentials that use the Reauth flow must have the reauth scope, ``https://www.googleapis.com/auth/accounts.reauth``. This module provides a high-level function for executing the Reauth process, :func:`refresh_grant`, and lower-level helpers for doing the individual steps of the reauth process. Those steps are: 1. Obtaining a list of challenges from the reauth server. 2. Running through each challenge and sending the result back to the reauth server. 3. Refreshing the access token using the returned rapt token. � N)� exceptions)�metrics)�_client)� challengesz/https://www.googleapis.com/auth/accounts.reauthz)https://reauth.googleapis.com/v2/sessions� invalid_grant�invalid_rapt� rapt_required� AUTHENTICATED�CHALLENGE_REQUIRED�CHALLENGE_PENDING� c C s t j�� S )a� Check if we are in an interractive environment. Override this function with a different logic if you are using this library outside a CLI. If the rapt token needs refreshing, the user needs to answer the challenges. If the user is not in an interractive environment, the challenges can not be answered and we just wait for timeout for no reason. Returns: bool: True if is interactive environment, False otherwise. )�sys�stdin�isatty� r r �G/usr/local/CyberCP/lib/python3.10/site-packages/google/oauth2/reauth.py�is_interactive<