(
        self,
        signer,
        issuer,
        subject,
        additional_claims=None,
        token_lifetime=_DEFAULT_TOKEN_LIFETIME_SECS,
        max_cache_size=_DEFAULT_MAX_CACHE_SIZE,
        quota_project_id=None,
    )
Args:
            signer (google.auth.crypt.Signer): The signer used to sign JWTs.
            issuer (str): The `iss` claim.
            subject (str): The `sub` claim.
            additional_claims (Mapping[str, str]): Any additional claims for
                the JWT payload.
            token_lifetime (int): The amount of time in seconds for
                which the token is valid. Defaults to 1 hour.
            max_cache_size (int): The maximum number of JWT tokens to keep in
                cache. Tokens are cached using :class:`cachetools.LRUCache`.
            quota_project_id (Optional[str]): The project ID used for quota
                and billing.
Args:
            signer (google.auth.crypt.Signer): The signer used to sign JWTs.
            issuer (str): The `iss` claim.
            subject (str): The `sub` claim.
            additional_claims (Mapping[str, str]): Any additional claims for
                the JWT payload.
            token_lifetime (int): The amount of time in seconds for
                which the token is valid. Defaults to 1 hour.
            max_cache_size (int): The maximum number of JWT tokens to keep in
                cache. Tokens are cached using :class:`cachetools.LRUCache`.
            quota_project_id (Optional[str]): The project ID used for quota
                and billing.
Args : signer ( google . auth . crypt . Signer ) : The signer used to sign JWTs . issuer ( str ) : The iss claim . subject ( str ) : The sub claim . additional_claims ( Mapping [ str str ] ) : Any additional claims for the JWT payload . token_lifetime ( int ) : The amount of time in seconds for which the token is valid . Defaults to 1 hour . max_cache_size ( int ) : The maximum number of JWT tokens to keep in cache . Tokens are cached using : class : cachetools . LRUCache . quota_project_id ( Optional [ str ] ) : The project ID used for quota and billing .
def __init__(
        self,
        signer,
        issuer,
        subject,
        additional_claims=None,
        token_lifetime=_DEFAULT_TOKEN_LIFETIME_SECS,
        max_cache_size=_DEFAULT_MAX_CACHE_SIZE,
        quota_project_id=None,
    ):
        """
        Args:
            signer (google.auth.crypt.Signer): The signer used to sign JWTs.
            issuer (str): The `iss` claim.
            subject (str): The `sub` claim.
            additional_claims (Mapping[str, str]): Any additional claims for
                the JWT payload.
            token_lifetime (int): The amount of time in seconds for
                which the token is valid. Defaults to 1 hour.
            max_cache_size (int): The maximum number of JWT tokens to keep in
                cache. Tokens are cached using :class:`cachetools.LRUCache`.
            quota_project_id (Optional[str]): The project ID used for quota
                and billing.

        """
        super(OnDemandCredentials, self).__init__()
        self._signer = signer
        self._issuer = issuer
        self._subject = subject
        self._token_lifetime = token_lifetime
        self._quota_project_id = quota_project_id

        if additional_claims is None:
            additional_claims = {}

        self._additional_claims = additional_claims
        self._cache = cachetools.LRUCache(maxsize=max_cache_size)
def __init__ ( self , signer , issuer , subject , additional_claims = None , token_lifetime = _DEFAULT_TOKEN_LIFETIME_SECS , max_cache_size = _DEFAULT_MAX_CACHE_SIZE , quota_project_id = None , ) : super ( OnDemandCredentials , self ) . __init__ ( ) self . _signer = signer self . _issuer = issuer self . _subject = subject self . _token_lifetime = token_lifetime self . _quota_project_id = quota_project_id if additional_claims is None : additional_claims = { } self . _additional_claims = additional_claims self . _cache = cachetools . LRUCache ( maxsize = max_cache_size )