How to use the aiogoogle.utils._dict function in aiogoogle

To help you get started, we’ve selected a few aiogoogle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github omarryhan / aiogoogle / aiogoogle / auth / creds.py View on Github external
nonce (str): 
        
            * The value of the nonce supplied by your app in the authentication request.
            
            * You should enforce protection against replay attacks by ensuring it is presented only once.
        
        hd (str):
        
            * The hosted G Suite domain of the user. Provided only if the user belongs to a hosted domain.
    """

    pass


class UserCreds(_dict):
    """
    OAuth2 User Credentials Dictionary

    Attributes:

        access_token (str): Access Token
        refresh_token (str): Refresh Token
        expires_in (int): seconds till expiry from creation
        expires_at (str): JSON datetime ISO 8601 expiry datetime
        scopes (list): list of scopes owned by access token
        
        id_token (aiogoogle.auth.creds.IdToken): Decoded OpenID JWT
        id_token_jwt (str): Encoded OpenID JWT
        
        token_type (str): Bearer
        token_uri (str): URI where this token was issued from
github omarryhan / aiogoogle / aiogoogle / auth / creds.py View on Github external
__all__ = ["ApiKey", "UserCreds", "ClientCreds"]


from ..utils import _dict


class ApiKey(str):
    pass


class IdToken(_dict):
    """
    OpenID connect ID token

    Example:

        {"iss":"accounts.google.com",
        "at_hash":"HK6E_P6Dh8Y93mRNtsDB1Q",
        "email_verified":"true",
        "sub":"10769150350006150715113082367",
        "azp":"1234987819200.apps.googleusercontent.com",
        "email":"jsmith@example.com",
        "aud":"1234987819200.apps.googleusercontent.com",
        "iat":1353601026,
        "exp":1353604926,
        "nonce": "0394852-3190485-2490358",
        "hd":"example.com"}
github omarryhan / aiogoogle / aiogoogle / auth / creds.py View on Github external
self.access_token = access_token
        self.refresh_token = refresh_token
        self.expires_in = expires_in
        self.expires_at = expires_at
        self.scopes = scopes

        self.id_token = id_token
        self.id_token_jwt = id_token_jwt

        self.token_type = token_type
        self.token_uri = token_uri
        self.token_info_uri = token_info_uri
        self.revoke_uri = revoke_uri


class ClientCreds(_dict):
    """
    OAuth2 Client Credentials Dictionary

    Examples:

        Scopes: ['openid', 'email', 'https://www.googleapis.com/auth/youtube.force-ssl']

    Arguments:

        client_id (str): OAuth2 client ID
        client_secret (str): OAuth2 client secret
        scopes (list): List of scopes that this client should request from resource server
        redirect_uri (str): client's redirect uri
    """

    def __init__(
github omarryhan / aiogoogle / aiogoogle / utils.py View on Github external
def __setitem__(self, key, value):  # pragma: no cover
        super(_dict, self).__setitem__(key, value)
        self.__dict__.update({key: value})