Files
deb-python-oauth2client/docs/epy/oauth2client.appengine.OAuth2Decorator-class.html
Joe Gregorio 5350efbd19 Refresh docs
2012-10-24 08:54:11 -04:00

733 lines
28 KiB
HTML

<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>oauth2client.appengine.OAuth2Decorator</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="oauth2client-module.html">Package&nbsp;oauth2client</a> ::
<a href="oauth2client.appengine-module.html">Module&nbsp;appengine</a> ::
Class&nbsp;OAuth2Decorator
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="oauth2client.appengine.OAuth2Decorator-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class OAuth2Decorator</h1><p class="nomargin-top"><span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator">source&nbsp;code</a></span></p>
<center>
<center> <map id="class_hierarchy_for_oauth2deco" name="class_hierarchy_for_oauth2deco">
<area shape="rect" href="oauth2client.appengine.OAuth2Decorator-class.html" title="OAuth2Decorator" alt="" coords="5,5,125,32"/>
</map>
<img src="class_hierarchy_for_oauth2deco.gif" alt='' usemap="#class_hierarchy_for_oauth2deco" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<pre class="literalblock">
Utility for making OAuth 2.0 easier.
Instantiate and then use with oauth_required or oauth_aware
as decorators on webapp.RequestHandler methods.
Example:
decorator = OAuth2Decorator(
client_id='837...ent.com',
client_secret='Qh...wwI',
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
</pre>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="oauth2client.appengine.OAuth2Decorator-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">client_id</span>,
<span class="summary-sig-arg">client_secret</span>,
<span class="summary-sig-arg">scope</span>,
<span class="summary-sig-arg">auth_uri</span>=<span class="summary-sig-default">'https://accounts.google.com/o/oauth2/auth'</span>,
<span class="summary-sig-arg">token_uri</span>=<span class="summary-sig-default">'https://accounts.google.com/o/oauth2/token'</span>,
<span class="summary-sig-arg">user_agent</span>=<span class="summary-sig-default">None</span>,
<span class="summary-sig-arg">message</span>=<span class="summary-sig-default">None</span>,
<span class="summary-sig-arg">callback_path</span>=<span class="summary-sig-default">'/oauth2callback'</span>,
<span class="summary-sig-arg">**kwargs</span>)</span><br />
Constructor for OAuth2Decorator</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_display_error_message"></a><span class="summary-sig-name">_display_error_message</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">request_handler</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator._display_error_message">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="oauth2client.appengine.OAuth2Decorator-class.html#oauth_required" class="summary-sig-name">oauth_required</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">method</span>)</span><br />
Decorator that starts the OAuth 2.0 dance.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.oauth_required">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="oauth2client.appengine.OAuth2Decorator-class.html#_create_flow" class="summary-sig-name" onclick="show_private();">_create_flow</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">request_handler</span>)</span><br />
Create the Flow object.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator._create_flow">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="oauth2client.appengine.OAuth2Decorator-class.html#oauth_aware" class="summary-sig-name">oauth_aware</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">method</span>)</span><br />
Decorator that sets up for OAuth 2.0 dance, but doesn't do it.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.oauth_aware">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="oauth2client.appengine.OAuth2Decorator-class.html#has_credentials" class="summary-sig-name">has_credentials</a>(<span class="summary-sig-arg">self</span>)</span><br />
True if for the logged in user there are valid access Credentials.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.has_credentials">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="oauth2client.appengine.OAuth2Decorator-class.html#authorize_url" class="summary-sig-name">authorize_url</a>(<span class="summary-sig-arg">self</span>)</span><br />
Returns the URL to start the OAuth dance.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.authorize_url">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="oauth2client.appengine.OAuth2Decorator-class.html#http" class="summary-sig-name">http</a>(<span class="summary-sig-arg">self</span>)</span><br />
Returns an authorized http instance.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.http">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="oauth2client.appengine.OAuth2Decorator-class.html#callback_path" class="summary-sig-name">callback_path</a>(<span class="summary-sig-arg">self</span>)</span><br />
The absolute path where the callback will occur.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.callback_path">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="oauth2client.appengine.OAuth2Decorator-class.html#callback_handler" class="summary-sig-name">callback_handler</a>(<span class="summary-sig-arg">self</span>)</span><br />
RequestHandler for the OAuth 2.0 redirect callback.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.callback_handler">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="oauth2client.appengine.OAuth2Decorator-class.html#callback_application" class="summary-sig-name">callback_application</a>(<span class="summary-sig-arg">self</span>)</span><br />
WSGI application for handling the OAuth 2.0 redirect callback.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.callback_application">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__format__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__sizeof__</code>,
<code>__str__</code>,
<code>__subclasshook__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">client_id</span>,
<span class="sig-arg">client_secret</span>,
<span class="sig-arg">scope</span>,
<span class="sig-arg">auth_uri</span>=<span class="sig-default">'https://accounts.google.com/o/oauth2/auth'</span>,
<span class="sig-arg">token_uri</span>=<span class="sig-default">'https://accounts.google.com/o/oauth2/token'</span>,
<span class="sig-arg">user_agent</span>=<span class="sig-default">None</span>,
<span class="sig-arg">message</span>=<span class="sig-default">None</span>,
<span class="sig-arg">callback_path</span>=<span class="sig-default">'/oauth2callback'</span>,
<span class="sig-arg">**kwargs</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Constructor for OAuth2Decorator
Args:
client_id: string, client identifier.
client_secret: string client secret.
scope: string or list of strings, scope(s) of the credentials being
requested.
auth_uri: string, URI for authorization endpoint. For convenience
defaults to Google's endpoints but any OAuth 2.0 provider can be used.
token_uri: string, URI for token endpoint. For convenience
defaults to Google's endpoints but any OAuth 2.0 provider can be used.
user_agent: string, User agent of your application, default to None.
message: Message to display if there are problems with the OAuth 2.0
configuration. The message may contain HTML and will be presented on the
web interface for any method that uses the decorator.
callback_path: string, The absolute path to use as the callback URI. Note
that this must match up with the URI given when registering the
application in the APIs Console.
**kwargs: dict, Keyword arguments are be passed along as kwargs to the
OAuth2WebServerFlow constructor.
</pre>
<dl class="fields">
<dt>Decorators:</dt>
<dd><ul class="nomargin-top">
<li><code>@util.positional(4)</code></li>
</ul></dd>
<dt>Overrides:
object.__init__
</dt>
</dl>
</td></tr></table>
</div>
<a name="oauth_required"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">oauth_required</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">method</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.oauth_required">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Decorator that starts the OAuth 2.0 dance.
Starts the OAuth dance for the logged in user if they haven't already
granted access for this application.
Args:
method: callable, to be decorated method of a webapp.RequestHandler
instance.
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="_create_flow"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">_create_flow</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">request_handler</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator._create_flow">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Create the Flow object.
The Flow is calculated lazily since we don't know where this app is
running until it receives a request, at which point redirect_uri can be
calculated and then the Flow object can be constructed.
Args:
request_handler: webapp.RequestHandler, the request handler.
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="oauth_aware"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">oauth_aware</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">method</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.oauth_aware">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Decorator that sets up for OAuth 2.0 dance, but doesn't do it.
Does all the setup for the OAuth dance, but doesn't initiate it.
This decorator is useful if you want to create a page that knows
whether or not the user has granted access to this application.
From within a method decorated with @oauth_aware the has_credentials()
and authorize_url() methods can be called.
Args:
method: callable, to be decorated method of a webapp.RequestHandler
instance.
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="has_credentials"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">has_credentials</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.has_credentials">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
True if for the logged in user there are valid access Credentials.
Must only be called from with a webapp.RequestHandler subclassed method
that had been decorated with either @oauth_required or @oauth_aware.
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="authorize_url"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">authorize_url</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.authorize_url">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Returns the URL to start the OAuth dance.
Must only be called from with a webapp.RequestHandler subclassed method
that had been decorated with either @oauth_required or @oauth_aware.
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="http"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">http</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.http">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Returns an authorized http instance.
Must only be called from within an @oauth_required decorated method, or
from within an @oauth_aware decorated method where has_credentials()
returns True.
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="callback_path"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">callback_path</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.callback_path">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
The absolute path where the callback will occur.
Note this is the absolute path, not the absolute URI, that will be
calculated by the decorator at runtime. See callback_handler() for how this
should be used.
Returns:
The callback path as a string.
</pre>
<dl class="fields">
<dt>Decorators:</dt>
<dd><ul class="nomargin-top">
<li><code>@property</code></li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<a name="callback_handler"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">callback_handler</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.callback_handler">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
RequestHandler for the OAuth 2.0 redirect callback.
Usage:
app = webapp.WSGIApplication([
('/index', MyIndexHandler),
...,
(decorator.callback_path, decorator.callback_handler())
])
Returns:
A webapp.RequestHandler that handles the redirect back from the
server during the OAuth 2.0 dance.
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="callback_application"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">callback_application</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.appengine-pysrc.html#OAuth2Decorator.callback_application">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
WSGI application for handling the OAuth 2.0 redirect callback.
If you need finer grained control use `callback_handler` which returns just
the webapp.RequestHandler.
Returns:
A webapp.WSGIApplication that handles the redirect back from the
server during the OAuth 2.0 dance.
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Wed Oct 24 08:53:07 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>