def __init__(self, signer, issuer, subject,
                 additional_claims=None,
                 token_lifetime=_DEFAULT_TOKEN_LIFETIME_SECS,
                 max_cache_size=_DEFAULT_MAX_CACHE_SIZE):
        """
        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`.
        """
        super(OnDemandCredentials, self).__init__()
        self._signer = signer
        self._issuer = issuer
        self._subject = subject
        self._token_lifetime = token_lifetime

        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 ) : super ( OnDemandCredentials , self ) . __init__ ( ) self . _signer = signer self . _issuer = issuer self . _subject = subject self . _token_lifetime = token_lifetime if additional_claims is None : additional_claims = { } self . _additional_claims = additional_claims self . _cache = cachetools . LRUCache ( maxsize = max_cache_size )
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`.