| Home | Trees | Indices | Help | 
|---|
|  | 
 
An OAuth2Decorator that builds from a clientsecrets file.
Uses a clientsecrets file as the source for all the information when
constructing an OAuth2Decorator.
Example:
  decorator = OAuth2DecoratorFromClientSecrets(
    os.path.join(os.path.dirname(__file__), 'client_secrets.json')
    scope='https://www.googleapis.com/auth/plus')
  class MainHandler(webapp.RequestHandler):
    @decorator.oauth_required
    def get(self):
      http = decorator.http()
      # http is authorized with the user's Credentials and can be used
      # in API calls
| 
 | |||
| 
 | |||
| Inherited from  Inherited from  Inherited from  | |||
| 
 | |||
| Inherited from  | |||
| 
 | |||
| Inherited from  | |||
| 
 | |||
| 
 
Constructor
Args:
  filename: string, File name of client secrets.
  scope: string or iterable of strings, scope(s) of the credentials being
    requested.
  message: string, A friendly string to display to the user if the
    clientsecrets file is missing or invalid. The message may contain HTML
    and will be presented on the web interface for any method that uses the
    decorator.
  cache: An optional cache service client that implements get() and set()
    methods. See clientsecrets.loadfile() for details.
  **kwargs: dict, Keyword arguments are passed along as kwargs to
    the OAuth2WebServerFlow constructor.
 | 
| Home | Trees | Indices | Help | 
|---|
| Generated by Epydoc 3.0.1 on Mon Sep 29 15:21:52 2014 | http://epydoc.sourceforge.net |