Package oauth2client :: Module client :: Class AssertionCredentials |
[hide private]
[frames] | no frames]

# Class AssertionCredentials

source code

    Abstract Credentials object used for OAuth 2.0 assertion grants.

    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. It must
    be subclassed to generate the appropriate assertion string.

    AssertionCredentials objects may be safely pickled and unpickled.

Instance Methods | [hide private]
__init__(self, assertion_type, user_agent=None, token_uri=GOOGLE_TOKEN_URI, revoke_uri=GOOGLE_REVOKE_URI, **unused_kwargs) Constructor for AssertionFlowCredentials. | source code
_generate_refresh_request_body(self) Generate the body that will be used in the refresh request. | source code
_generate_assertion(self) Generate the assertion string that will be used in the access token request. | source code
_revoke(self, http_request) Revokes the access_token and deletes the store if available. | source code
Inherited from `OAuth2Credentials`: `__getstate__`, `__setstate__`, `access_token_expired`, `apply`, `authorize`, `refresh`, `revoke`, `set_store`, `to_json` Inherited from `OAuth2Credentials` (private): `_do_refresh_request`, `_do_revoke`, `_generate_refresh_request_headers`, `_refresh`, `_updateFromCredential` Inherited from `Credentials` (private): `_to_json` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Methods | [hide private]
Inherited from `OAuth2Credentials`: `from_json` Inherited from `Credentials`: `new_from_json`

Class Variables | [hide private]
Inherited from `Credentials`: `NON_SERIALIZED_MEMBERS`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, assertion_type, user_agent=None, token_uri=GOOGLE_TOKEN_URI, revoke_uri=GOOGLE_REVOKE_URI, **unused_kwargs) (Constructor) | source code
    Constructor for AssertionFlowCredentials.

    Args:
      assertion_type: string, assertion type that will be declared to the auth
        server
      user_agent: string, The HTTP User-Agent to provide for this application.
      token_uri: string, URI for token endpoint. For convenience
        defaults to Google's endpoints but any OAuth 2.0 provider can be used.
      revoke_uri: string, URI for revoke endpoint.
Decorators: `@util.positional(2)` Overrides: object.__init__

### _generate_refresh_request_body(self) | source code
    Generate the body that will be used in the refresh request.
Overrides: OAuth2Credentials._generate_refresh_request_body (inherited documentation)

### _revoke(self, http_request) | source code
    Revokes the access_token and deletes the store if available.

    Args:
      http_request: callable, a callable that matches the method signature of
        httplib2.Http.request, used to make the revoke request.
Overrides: OAuth2Credentials._revoke