| Trees | Indices | Help |
|---|
|
|
Base class for all Credentials objects. Subclasses must define an authorize() method that applies the credentials to an HTTP transport. Subclasses must also specify a classmethod named 'from_json' that takes a JSON string as input and returns an instaniated Credentials object.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
|||
|
|||
|
|||
NON_SERIALIZED_MEMBERS = ['store']
|
|||
|
|||
|
Inherited from |
|||
|
|||
Take an httplib2.Http instance (or equivalent) and authorizes it.
Authorizes it for the set of credentials, usually by replacing
http.request() with a method that adds in the appropriate headers and then
delegates to the original Http.request() method.
Args:
http: httplib2.Http, an http object to be used to make the refresh
request.
|
Forces a refresh of the access_token.
Args:
http: httplib2.Http, an http object to be used to make the refresh
request.
|
Revokes a refresh_token and makes the credentials void.
Args:
http: httplib2.Http, an http object to be used to make the revoke
request.
|
Add the authorization to the headers. Args: headers: dict, the headers to add the Authorization header to. |
Utility function that creates JSON repr. of a Credentials object. Args: strip: array, An array of names of members to not include in the JSON. Returns: string, a JSON representation of this instance, suitable to pass to from_json(). |
Creating a JSON representation of an instance of Credentials. Returns: string, a JSON representation of this instance, suitable to pass to from_json(). |
Utility class method to instantiate a Credentials subclass from a JSON representation produced by to_json(). Args: s: string, JSON from to_json(). Returns: An instance of the subclass of Credentials that was serialized with to_json(). |
Instantiate a Credentials object from a JSON description of it. The JSON should have been produced by calling .to_json() on the object. Args: data: dict, A deserialized JSON object. Returns: An instance of a Credentials subclass. |
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Thu Mar 7 10:31:24 2013 | http://epydoc.sourceforge.net |