Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str ClassDef bases NameLoad body Expr Str Assign NameStore Num Expr Str Assign NameStore BinOpBitOr Call NameLoad ListLoad Str AttributeLoad NameLoad attr Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq NameLoad NameLoad body Raise Call NameLoad Str NameLoad Str NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad If CompareIsNot AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str body Expr Str With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return TupleLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Dict Str Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str NameLoad keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return UnaryOpNot AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list
N/A N/A oauth2client Service account credentials class. N/A base64 N/A copy N/A datetime N/A json N/A time oauth2client GOOGLE_REVOKE_URI oauth2client GOOGLE_TOKEN_URI oauth2client._helpers _json_encode oauth2client._helpers _from_bytes oauth2client._helpers _urlsafe_b64encode oauth2client util oauth2client.client AssertionCredentials oauth2client.client EXPIRY_FORMAT oauth2client.client SERVICE_ACCOUNT oauth2client crypt N/A _PASSWORD_DEFAULT notasecret N/A _PKCS12_KEY _private_key_pkcs12 N/A _PKCS12_ERROR 
This library only implements PKCS#12 support via the pyOpenSSL library.
Either install pyOpenSSL, or please convert the .p12 file
to .pem format:
    $ cat key.p12 | \
    >   openssl pkcs12 -nodes -nocerts -passin pass:notasecret | \
    >   openssl rsa > key.pem
 ServiceAccountCredentials N/A AssertionCredentials N/A N/A Service Account credential for OAuth 2.0 signed JWT grants.

    Supports

    * JSON keyfile (typically contains a PKCS8 key stored as
      PEM text)
    * ``.p12`` key (stores PKCS12 key and certificate)

    Makes an assertion to server using a signed JWT assertion in exchange
    for an access token.

    This credential does not require a flow to instantiate because it
    represents a two legged flow, and therefore has all of the required
    information to generate and refresh its own access tokens.

    Args:
        service_account_email: string, The email associated with the
                               service account.
        signer: ``crypt.Signer``, A signer which can be used to sign content.
        scopes: List or string, (Optional) Scopes to use when acquiring
                an access token.
        private_key_id: string, (Optional) Private key identifier. Typically
                        only used with a JSON keyfile. Can be sent in the
                        header of a JWT token assertion.
        client_id: string, (Optional) Client ID for the project that owns the
                   service account.
        user_agent: string, (Optional) User agent to use when sending
                    request.
        kwargs: dict, Extra key-value pairs (both strings) to send in the
                payload body when making an assertion.
     N/A MAX_TOKEN_LIFETIME_SECS 3600 N/A Max lifetime of the token (one hour, in seconds). N/A NON_SERIALIZED_MEMBERS N/A N/A frozenset N/A _signer N/A AssertionCredentials NON_SERIALIZED_MEMBERS N/A Members that aren't serialized when object is converted to JSON. N/A _private_key_pkcs8_pem None N/A _private_key_pkcs12 None N/A _private_key_password None __init__ N/A N/A self service_account_email signer scopes private_key_id client_id user_agent N/A None None None kwargs N/A N/A N/A N/A N/A super ServiceAccountCredentials self __init__ None user_agent user_agent N/A N/A self _service_account_email service_account_email N/A N/A self _signer signer N/A N/A self _scopes N/A N/A util scopes_to_string scopes N/A N/A self _private_key_id private_key_id N/A N/A self client_id client_id N/A N/A self _user_agent user_agent N/A N/A self _kwargs kwargs N/A _to_json N/A N/A self strip to_serialize N/A None N/A N/A Utility function that creates JSON repr. of a credentials object.

        Over-ride is needed since PKCS#12 keys will not in general be JSON
        serializable.

        Args:
            strip: array, An array of names of members to exclude from the
                   JSON.
            to_serialize: dict, (Optional) The properties for this object
                          that will be serialized. This allows callers to modify
                          before serializing.

        Returns:
            string, a JSON representation of this instance, suitable to pass to
            from_json().
         N/A N/A to_serialize None N/A N/A to_serialize N/A N/A copy copy N/A self __dict__ N/A pkcs12_val N/A N/A to_serialize get _PKCS12_KEY N/A N/A pkcs12_val None N/A N/A N/A to_serialize N/A _PKCS12_KEY N/A N/A base64 b64encode pkcs12_val N/A N/A N/A N/A super ServiceAccountCredentials self _to_json strip to_serialize to_serialize N/A _from_parsed_json_keyfile N/A N/A cls keyfile_dict scopes N/A N/A N/A Helper for factory constructors from JSON keyfile.

        Args:
            keyfile_dict: dict-like object, The parsed dictionary-like object
                          containing the contents of the JSON keyfile.
            scopes: List or string, Scopes to use when acquiring an
                    access token.

        Returns:
            ServiceAccountCredentials, a credentials object created from
            the keyfile contents.

        Raises:
            ValueError, if the credential type is not :data:`SERVICE_ACCOUNT`.
            KeyError, if one of the expected keys is not present in
                the keyfile.
         N/A creds_type N/A N/A keyfile_dict get type N/A N/A creds_type SERVICE_ACCOUNT N/A N/A N/A ValueError Unexpected credentials type creds_type Expected SERVICE_ACCOUNT N/A service_account_email N/A keyfile_dict N/A client_email N/A private_key_pkcs8_pem N/A keyfile_dict N/A private_key N/A private_key_id N/A keyfile_dict N/A private_key_id N/A client_id N/A keyfile_dict N/A client_id N/A signer N/A N/A N/A crypt Signer from_string private_key_pkcs8_pem N/A credentials N/A cls service_account_email signer scopes scopes private_key_id private_key_id client_id client_id N/A N/A credentials _private_key_pkcs8_pem private_key_pkcs8_pem N/A credentials N/A classmethod from_json_keyfile_name N/A N/A cls filename scopes N/A N/A N/A Factory constructor from JSON keyfile by name.

        Args:
            filename: string, The location of the keyfile.
            scopes: List or string, (Optional) Scopes to use when acquiring an
                    access token.

        Returns:
            ServiceAccountCredentials, a credentials object created from
            the keyfile.

        Raises:
            ValueError, if the credential type is not :data:`SERVICE_ACCOUNT`.
            KeyError, if one of the expected keys is not present in
                the keyfile.
         N/A N/A open filename r file_obj N/A N/A client_credentials N/A N/A json load file_obj N/A N/A N/A cls _from_parsed_json_keyfile client_credentials scopes N/A classmethod from_json_keyfile_dict N/A N/A cls keyfile_dict scopes N/A N/A N/A Factory constructor from parsed JSON keyfile.

        Args:
            keyfile_dict: dict-like object, The parsed dictionary-like object
                          containing the contents of the JSON keyfile.
            scopes: List or string, (Optional) Scopes to use when acquiring an
                    access token.

        Returns:
            ServiceAccountCredentials, a credentials object created from
            the keyfile.

        Raises:
            ValueError, if the credential type is not :data:`SERVICE_ACCOUNT`.
            KeyError, if one of the expected keys is not present in
                the keyfile.
         N/A N/A N/A cls _from_parsed_json_keyfile keyfile_dict scopes N/A classmethod _from_p12_keyfile_contents N/A N/A cls service_account_email private_key_pkcs12 private_key_password scopes N/A None N/A N/A Factory constructor from JSON keyfile.

        Args:
            service_account_email: string, The email associated with the
                                   service account.
            private_key_pkcs12: string, The contents of a PKCS#12 keyfile.
            private_key_password: string, (Optional) Password for PKCS#12
                                  private key. Defaults to ``notasecret``.
            scopes: List or string, (Optional) Scopes to use when acquiring an
                    access token.

        Returns:
            ServiceAccountCredentials, a credentials object created from
            the keyfile.

        Raises:
            NotImplementedError if pyOpenSSL is not installed / not the
            active crypto library.
         N/A N/A private_key_password None N/A N/A private_key_password _PASSWORD_DEFAULT N/A N/A N/A crypt Signer N/A crypt OpenSSLSigner N/A N/A N/A NotImplementedError _PKCS12_ERROR N/A signer N/A N/A N/A crypt Signer from_string private_key_pkcs12 private_key_password N/A credentials N/A cls service_account_email signer scopes scopes N/A N/A credentials _private_key_pkcs12 private_key_pkcs12 N/A N/A credentials _private_key_password private_key_password N/A credentials N/A classmethod from_p12_keyfile N/A N/A cls service_account_email filename private_key_password scopes N/A None N/A N/A Factory constructor from JSON keyfile.

        Args:
            service_account_email: string, The email associated with the
                                   service account.
            filename: string, The location of the PKCS#12 keyfile.
            private_key_password: string, (Optional) Password for PKCS#12
                                  private key. Defaults to ``notasecret``.
            scopes: List or string, (Optional) Scopes to use when acquiring an
                    access token.

        Returns:
            ServiceAccountCredentials, a credentials object created from
            the keyfile.

        Raises:
            NotImplementedError if pyOpenSSL is not installed / not the
            active crypto library.
         N/A N/A open filename rb file_obj N/A N/A private_key_pkcs12 N/A N/A file_obj read N/A N/A N/A cls _from_p12_keyfile_contents service_account_email private_key_pkcs12 private_key_password private_key_password scopes scopes N/A classmethod from_p12_keyfile_buffer N/A N/A cls service_account_email file_buffer private_key_password scopes N/A None N/A N/A Factory constructor from JSON keyfile.

        Args:
            service_account_email: string, The email associated with the
                                   service account.
            file_buffer: stream, A buffer that implements ``read()``
                         and contains the PKCS#12 key contents.
            private_key_password: string, (Optional) Password for PKCS#12
                                  private key. Defaults to ``notasecret``.
            scopes: List or string, (Optional) Scopes to use when acquiring an
                    access token.

        Returns:
            ServiceAccountCredentials, a credentials object created from
            the keyfile.

        Raises:
            NotImplementedError if pyOpenSSL is not installed / not the
            active crypto library.
         N/A private_key_pkcs12 N/A N/A file_buffer read N/A N/A N/A cls _from_p12_keyfile_contents service_account_email private_key_pkcs12 private_key_password private_key_password scopes scopes N/A classmethod _generate_assertion N/A N/A self N/A N/A N/A Generate the assertion that will be used in the request. N/A now N/A int N/A N/A time time N/A payload N/A aud scope iat exp iss N/A self token_uri N/A self _scopes now N/A now N/A self MAX_TOKEN_LIFETIME_SECS N/A self _service_account_email N/A N/A N/A payload update N/A self _kwargs N/A N/A N/A crypt make_signed_jwt N/A self _signer payload key_id N/A self _private_key_id N/A sign_blob N/A N/A self blob N/A N/A N/A Cryptographically sign a blob (of bytes).

        Implements abstract method
        :meth:`oauth2client.client.AssertionCredentials.sign_blob`.

        Args:
            blob: bytes, Message to be signed.

        Returns:
            tuple, A pair of the private key ID used to sign the blob and
            the signed contents.
         N/A N/A N/A self _private_key_id N/A N/A N/A self _signer sign blob N/A service_account_email N/A N/A self N/A N/A N/A Get the email for the current service account.

        Returns:
            string, The email associated with the service account.
         N/A N/A self _service_account_email N/A property serialization_data N/A N/A self N/A N/A N/A N/A type client_email private_key_id private_key client_id service_account N/A self _service_account_email N/A self _private_key_id N/A self _private_key_pkcs8_pem N/A self client_id N/A property from_json N/A N/A cls json_data N/A N/A N/A Deserialize a JSON-serialized instance.

        Inverse to :meth:`to_json`.

        Args:
            json_data: dict or string, Serialized JSON (as a string or an
                       already parsed dictionary) representing a credential.

        Returns:
            ServiceAccountCredentials from the serialized data.
         N/A N/A N/A isinstance json_data dict N/A N/A json_data N/A N/A json loads N/A _from_bytes json_data N/A private_key_pkcs8_pem None N/A pkcs12_val N/A N/A json_data get _PKCS12_KEY N/A password None N/A N/A pkcs12_val None N/A N/A private_key_pkcs8_pem N/A json_data N/A _private_key_pkcs8_pem N/A signer N/A N/A N/A crypt Signer from_string private_key_pkcs8_pem N/A N/A pkcs12_val N/A N/A base64 b64decode pkcs12_val N/A password N/A json_data N/A _private_key_password N/A signer N/A N/A N/A crypt Signer from_string pkcs12_val password N/A credentials N/A cls N/A json_data N/A _service_account_email signer scopes N/A json_data N/A _scopes private_key_id N/A json_data N/A _private_key_id client_id N/A json_data N/A client_id user_agent N/A json_data N/A _user_agent N/A json_data N/A _kwargs N/A N/A private_key_pkcs8_pem None N/A N/A N/A credentials _private_key_pkcs8_pem private_key_pkcs8_pem N/A N/A pkcs12_val None N/A N/A N/A credentials _private_key_pkcs12 pkcs12_val N/A N/A password None N/A N/A N/A credentials _private_key_password password N/A N/A credentials invalid N/A json_data N/A invalid N/A N/A credentials access_token N/A json_data N/A access_token N/A N/A credentials token_uri N/A json_data N/A token_uri N/A N/A credentials revoke_uri N/A json_data N/A revoke_uri N/A token_expiry N/A N/A json_data get token_expiry None N/A N/A token_expiry None N/A N/A N/A credentials token_expiry N/A N/A N/A datetime datetime strptime token_expiry EXPIRY_FORMAT N/A credentials N/A classmethod create_scoped_required N/A N/A self N/A N/A N/A N/A N/A self _scopes N/A create_scoped N/A N/A self scopes N/A N/A N/A result N/A N/A self __class__ N/A self _service_account_email N/A self _signer scopes scopes private_key_id N/A self _private_key_id client_id N/A self client_id user_agent N/A self _user_agent N/A self _kwargs N/A N/A result token_uri N/A self token_uri N/A N/A result revoke_uri N/A self revoke_uri N/A N/A result _private_key_pkcs8_pem N/A self _private_key_pkcs8_pem N/A N/A result _private_key_pkcs12 N/A self _private_key_pkcs12 N/A N/A result _private_key_password N/A self _private_key_password N/A result N/A create_delegated N/A N/A self sub N/A N/A N/A Create credentials that act as domain-wide delegation of authority.

        Use the ``sub`` parameter as the subject to delegate on behalf of
        that user.

        For example::

          >>> account_sub = 'foo@email.com'
          >>> delegate_creds = creds.create_delegated(account_sub)

        Args:
            sub: string, An email address that this service account will
                 act on behalf of (via domain-wide delegation).

        Returns:
            ServiceAccountCredentials, a copy of the current service account
            updated to act on behalf of ``sub``.
         N/A new_kwargs N/A dict N/A self _kwargs N/A N/A new_kwargs N/A sub sub N/A result N/A N/A self __class__ N/A self _service_account_email N/A self _signer scopes N/A self _scopes private_key_id N/A self _private_key_id client_id N/A self client_id user_agent N/A self _user_agent new_kwargs N/A N/A result token_uri N/A self token_uri N/A N/A result revoke_uri N/A self revoke_uri N/A N/A result _private_key_pkcs8_pem N/A self _private_key_pkcs8_pem N/A N/A result _private_key_pkcs12 N/A self _private_key_pkcs12 N/A N/A result _private_key_password N/A self _private_key_password N/A result N/A N/A