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, token_uri='https://accounts.google.com/o/oauth2/token', **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

Inherited from OAuth2Credentials: __getstate__, __setstate__, apply, authorize, refresh, set_store, to_json

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 OAuth2Credentials: access_token_expired

Inherited from object: __class__

Method Details [hide private]

__init__(self, assertion_type, user_agent, token_uri='https://accounts.google.com/o/oauth2/token', **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.

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)