blob: 3b54ce1a8f183761426990f1cc2f26e8b003cb57 [file] [log] [blame]
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -04001<?xml version="1.0" encoding="ascii"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6 <title>oauth2client.appengine.AppAssertionCredentials</title>
7 <link rel="stylesheet" href="epydoc.css" type="text/css" />
8 <script type="text/javascript" src="epydoc.js"></script>
9</head>
10
11<body bgcolor="white" text="black" link="blue" vlink="#204080"
12 alink="#204080">
13<!-- ==================== NAVIGATION BAR ==================== -->
14<table class="navbar" border="0" width="100%" cellpadding="0"
15 bgcolor="#a0c0ff" cellspacing="0">
16 <tr valign="middle">
17
18 <!-- Tree link -->
19 <th>&nbsp;&nbsp;&nbsp;<a
20 href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
21
22 <!-- Index link -->
23 <th>&nbsp;&nbsp;&nbsp;<a
24 href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
25
26 <!-- Help link -->
27 <th>&nbsp;&nbsp;&nbsp;<a
28 href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
29
30 <th class="navbar" width="100%"></th>
31 </tr>
32</table>
33<table width="100%" cellpadding="0" cellspacing="0">
34 <tr valign="top">
35 <td width="100%">
36 <span class="breadcrumbs">
37 <a href="oauth2client-module.html">Package&nbsp;oauth2client</a> ::
38 <a href="oauth2client.appengine-module.html">Module&nbsp;appengine</a> ::
39 Class&nbsp;AppAssertionCredentials
40 </span>
41 </td>
42 <td>
43 <table cellpadding="0" cellspacing="0">
44 <!-- hide/show private -->
45 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
46 onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
47 <tr><td align="right"><span class="options"
48 >[<a href="frames.html" target="_top">frames</a
49 >]&nbsp;|&nbsp;<a href="oauth2client.appengine.AppAssertionCredentials-class.html"
50 target="_top">no&nbsp;frames</a>]</span></td></tr>
51 </table>
52 </td>
53 </tr>
54</table>
55<!-- ==================== CLASS DESCRIPTION ==================== -->
56<h1 class="epydoc">Class AppAssertionCredentials</h1><p class="nomargin-top"><span class="codelink"><a href="oauth2client.appengine-pysrc.html#AppAssertionCredentials">source&nbsp;code</a></span></p>
57<center>
Joe Gregorio746096f2012-06-15 10:53:36 -040058<center> <map id="class_hierarchy_for_appasserti" name="class_hierarchy_for_appasserti">
59<area shape="rect" href="oauth2client.appengine.AppAssertionCredentials-class.html" title="AppAssertionCredentials" alt="" coords="12,173,175,200"/>
60<area shape="rect" href="oauth2client.client.AssertionCredentials-class.html" title="client.AssertionCredentials" alt="" coords="5,117,181,144"/>
61<area shape="rect" href="oauth2client.client.Credentials-class.html" title="client.Credentials" alt="" coords="33,5,153,32"/>
62<area shape="rect" href="oauth2client.client.OAuth2Credentials-class.html" title="client.OAuth2Credentials" alt="" coords="11,61,176,88"/>
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -040063</map>
Joe Gregorio746096f2012-06-15 10:53:36 -040064 <img src="class_hierarchy_for_appasserti.gif" alt='' usemap="#class_hierarchy_for_appasserti" ismap="ismap" class="graph-without-title" />
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -040065</center>
66</center>
67<hr />
68<pre class="literalblock">
69Credentials object for App Engine Assertion Grants
70
71This object will allow an App Engine application to identify itself to Google
72and other OAuth 2.0 servers that can verify assertions. It can be used for
73the purpose of accessing data stored under an account assigned to the App
74Engine application itself.
75
76This credential does not require a flow to instantiate because it represents
77a two legged flow, and therefore has all of the required information to
78generate and refresh its own access tokens.
79
80</pre>
81
82<!-- ==================== INSTANCE METHODS ==================== -->
83<a name="section-InstanceMethods"></a>
84<table class="summary" border="1" cellpadding="3"
85 cellspacing="0" width="100%" bgcolor="white">
86<tr bgcolor="#70b0f0" class="table-header">
87 <td colspan="2" class="table-header">
88 <table border="0" cellpadding="0" cellspacing="0" width="100%">
89 <tr valign="top">
90 <td align="left"><span class="table-header">Instance Methods</span></td>
91 <td align="right" valign="top"
92 ><span class="options">[<a href="#section-InstanceMethods"
93 class="privatelink" onclick="toggle_private();"
94 >hide private</a>]</span></td>
95 </tr>
96 </table>
97 </td>
98</tr>
99<tr>
100 <td width="15%" align="right" valign="top" class="summary">
101 <span class="summary-type">&nbsp;</span>
102 </td><td class="summary">
103 <table width="100%" cellpadding="0" cellspacing="0" border="0">
104 <tr>
105 <td><span class="summary-sig"><a href="oauth2client.appengine.AppAssertionCredentials-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
106 <span class="summary-sig-arg">scope</span>,
107 <span class="summary-sig-arg">**kwargs</span>)</span><br />
108 Constructor for AppAssertionCredentials</td>
109 <td align="right" valign="top">
110 <span class="codelink"><a href="oauth2client.appengine-pysrc.html#AppAssertionCredentials.__init__">source&nbsp;code</a></span>
111
112 </td>
113 </tr>
114 </table>
115
116 </td>
117 </tr>
118<tr class="private">
119 <td width="15%" align="right" valign="top" class="summary">
120 <span class="summary-type">&nbsp;</span>
121 </td><td class="summary">
122 <table width="100%" cellpadding="0" cellspacing="0" border="0">
123 <tr>
124 <td><span class="summary-sig"><a href="oauth2client.appengine.AppAssertionCredentials-class.html#_refresh" class="summary-sig-name" onclick="show_private();">_refresh</a>(<span class="summary-sig-arg">self</span>,
125 <span class="summary-sig-arg">http_request</span>)</span><br />
126 Refreshes the access_token.</td>
127 <td align="right" valign="top">
128 <span class="codelink"><a href="oauth2client.appengine-pysrc.html#AppAssertionCredentials._refresh">source&nbsp;code</a></span>
129
130 </td>
131 </tr>
132 </table>
133
134 </td>
135 </tr>
136 <tr>
137 <td colspan="2" class="summary">
138 <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.AssertionCredentials-class.html">client.AssertionCredentials</a></code></b> (private):
139 <code><a href="oauth2client.client.AssertionCredentials-class.html#_generate_assertion" onclick="show_private();">_generate_assertion</a></code>,
140 <code><a href="oauth2client.client.AssertionCredentials-class.html#_generate_refresh_request_body" onclick="show_private();">_generate_refresh_request_body</a></code>
141 </p></div>
142 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.OAuth2Credentials-class.html">client.OAuth2Credentials</a></code></b>:
143 <code><a href="oauth2client.client.OAuth2Credentials-class.html#__getstate__">__getstate__</a></code>,
144 <code><a href="oauth2client.client.OAuth2Credentials-class.html#__setstate__">__setstate__</a></code>,
145 <code><a href="oauth2client.client.OAuth2Credentials-class.html#apply">apply</a></code>,
146 <code><a href="oauth2client.client.OAuth2Credentials-class.html#authorize">authorize</a></code>,
147 <code><a href="oauth2client.client.OAuth2Credentials-class.html#refresh">refresh</a></code>,
148 <code><a href="oauth2client.client.OAuth2Credentials-class.html#set_store">set_store</a></code>,
149 <code><a href="oauth2client.client.OAuth2Credentials-class.html#to_json">to_json</a></code>
150 </p>
151 <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.OAuth2Credentials-class.html">client.OAuth2Credentials</a></code></b> (private):
152 <code><a href="oauth2client.client.OAuth2Credentials-class.html#_do_refresh_request" onclick="show_private();">_do_refresh_request</a></code>,
153 <code><a href="oauth2client.client.OAuth2Credentials-class.html#_generate_refresh_request_headers" onclick="show_private();">_generate_refresh_request_headers</a></code>,
154 <code><a href="oauth2client.client.OAuth2Credentials-class.html#_updateFromCredential" onclick="show_private();">_updateFromCredential</a></code>
155 </p></div>
156 <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.Credentials-class.html">client.Credentials</a></code></b> (private):
157 <code><a href="oauth2client.client.Credentials-class.html#_to_json" onclick="show_private();">_to_json</a></code>
158 </p></div>
159 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
160 <code>__delattr__</code>,
161 <code>__format__</code>,
162 <code>__getattribute__</code>,
163 <code>__hash__</code>,
164 <code>__new__</code>,
165 <code>__reduce__</code>,
166 <code>__reduce_ex__</code>,
167 <code>__repr__</code>,
168 <code>__setattr__</code>,
169 <code>__sizeof__</code>,
170 <code>__str__</code>,
171 <code>__subclasshook__</code>
172 </p>
173 </td>
174 </tr>
175</table>
176<!-- ==================== CLASS METHODS ==================== -->
177<a name="section-ClassMethods"></a>
178<table class="summary" border="1" cellpadding="3"
179 cellspacing="0" width="100%" bgcolor="white">
180<tr bgcolor="#70b0f0" class="table-header">
181 <td colspan="2" class="table-header">
182 <table border="0" cellpadding="0" cellspacing="0" width="100%">
183 <tr valign="top">
184 <td align="left"><span class="table-header">Class Methods</span></td>
185 <td align="right" valign="top"
186 ><span class="options">[<a href="#section-ClassMethods"
187 class="privatelink" onclick="toggle_private();"
188 >hide private</a>]</span></td>
189 </tr>
190 </table>
191 </td>
192</tr>
193<tr>
194 <td width="15%" align="right" valign="top" class="summary">
195 <span class="summary-type">&nbsp;</span>
196 </td><td class="summary">
197 <table width="100%" cellpadding="0" cellspacing="0" border="0">
198 <tr>
199 <td><span class="summary-sig"><a href="oauth2client.appengine.AppAssertionCredentials-class.html#from_json" class="summary-sig-name">from_json</a>(<span class="summary-sig-arg">cls</span>,
200 <span class="summary-sig-arg">json</span>)</span><br />
201 Instantiate a Credentials object from a JSON description of it.</td>
202 <td align="right" valign="top">
203 <span class="codelink"><a href="oauth2client.appengine-pysrc.html#AppAssertionCredentials.from_json">source&nbsp;code</a></span>
204
205 </td>
206 </tr>
207 </table>
208
209 </td>
210 </tr>
211 <tr>
212 <td colspan="2" class="summary">
213 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.Credentials-class.html">client.Credentials</a></code></b>:
214 <code><a href="oauth2client.client.Credentials-class.html#new_from_json">new_from_json</a></code>
215 </p>
216 </td>
217 </tr>
218</table>
219<!-- ==================== CLASS VARIABLES ==================== -->
220<a name="section-ClassVariables"></a>
221<table class="summary" border="1" cellpadding="3"
222 cellspacing="0" width="100%" bgcolor="white">
223<tr bgcolor="#70b0f0" class="table-header">
224 <td colspan="2" class="table-header">
225 <table border="0" cellpadding="0" cellspacing="0" width="100%">
226 <tr valign="top">
227 <td align="left"><span class="table-header">Class Variables</span></td>
228 <td align="right" valign="top"
229 ><span class="options">[<a href="#section-ClassVariables"
230 class="privatelink" onclick="toggle_private();"
231 >hide private</a>]</span></td>
232 </tr>
233 </table>
234 </td>
235</tr>
236 <tr>
237 <td colspan="2" class="summary">
238 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.Credentials-class.html">client.Credentials</a></code></b>:
239 <code><a href="oauth2client.client.Credentials-class.html#NON_SERIALIZED_MEMBERS">NON_SERIALIZED_MEMBERS</a></code>
240 </p>
241 </td>
242 </tr>
243</table>
244<!-- ==================== PROPERTIES ==================== -->
245<a name="section-Properties"></a>
246<table class="summary" border="1" cellpadding="3"
247 cellspacing="0" width="100%" bgcolor="white">
248<tr bgcolor="#70b0f0" class="table-header">
249 <td colspan="2" class="table-header">
250 <table border="0" cellpadding="0" cellspacing="0" width="100%">
251 <tr valign="top">
252 <td align="left"><span class="table-header">Properties</span></td>
253 <td align="right" valign="top"
254 ><span class="options">[<a href="#section-Properties"
255 class="privatelink" onclick="toggle_private();"
256 >hide private</a>]</span></td>
257 </tr>
258 </table>
259 </td>
260</tr>
261 <tr>
262 <td colspan="2" class="summary">
263 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.OAuth2Credentials-class.html">client.OAuth2Credentials</a></code></b>:
264 <code><a href="oauth2client.client.OAuth2Credentials-class.html#access_token_expired">access_token_expired</a></code>
265 </p>
266 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
267 <code>__class__</code>
268 </p>
269 </td>
270 </tr>
271</table>
272<!-- ==================== METHOD DETAILS ==================== -->
273<a name="section-MethodDetails"></a>
274<table class="details" border="1" cellpadding="3"
275 cellspacing="0" width="100%" bgcolor="white">
276<tr bgcolor="#70b0f0" class="table-header">
277 <td colspan="2" class="table-header">
278 <table border="0" cellpadding="0" cellspacing="0" width="100%">
279 <tr valign="top">
280 <td align="left"><span class="table-header">Method Details</span></td>
281 <td align="right" valign="top"
282 ><span class="options">[<a href="#section-MethodDetails"
283 class="privatelink" onclick="toggle_private();"
284 >hide private</a>]</span></td>
285 </tr>
286 </table>
287 </td>
288</tr>
289</table>
290<a name="__init__"></a>
291<div>
292<table class="details" border="1" cellpadding="3"
293 cellspacing="0" width="100%" bgcolor="white">
294<tr><td>
295 <table width="100%" cellpadding="0" cellspacing="0" border="0">
296 <tr valign="top"><td>
297 <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
298 <span class="sig-arg">scope</span>,
299 <span class="sig-arg">**kwargs</span>)</span>
300 <br /><em class="fname">(Constructor)</em>
301 </h3>
302 </td><td align="right" valign="top"
303 ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#AppAssertionCredentials.__init__">source&nbsp;code</a></span>&nbsp;
304 </td>
305 </tr></table>
306
307 <pre class="literalblock">
308Constructor for AppAssertionCredentials
309
310Args:
311 scope: string or list of strings, scope(s) of the credentials being requested.
312
313</pre>
314 <dl class="fields">
315 <dt>Overrides:
316 object.__init__
317 </dt>
318 </dl>
319</td></tr></table>
320</div>
321<a name="from_json"></a>
322<div>
323<table class="details" border="1" cellpadding="3"
324 cellspacing="0" width="100%" bgcolor="white">
325<tr><td>
326 <table width="100%" cellpadding="0" cellspacing="0" border="0">
327 <tr valign="top"><td>
328 <h3 class="epydoc"><span class="sig"><span class="sig-name">from_json</span>(<span class="sig-arg">cls</span>,
329 <span class="sig-arg">json</span>)</span>
330 <br /><em class="fname">Class Method</em>
331 </h3>
332 </td><td align="right" valign="top"
333 ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#AppAssertionCredentials.from_json">source&nbsp;code</a></span>&nbsp;
334 </td>
335 </tr></table>
336
337 <pre class="literalblock">
338Instantiate a Credentials object from a JSON description of it. The JSON
339should have been produced by calling .to_json() on the object.
340
341Args:
342 data: dict, A deserialized JSON object.
343
344Returns:
345 An instance of a Credentials subclass.
346
347</pre>
348 <dl class="fields">
349 <dt>Overrides:
350 <a href="oauth2client.client.Credentials-class.html#from_json">client.Credentials.from_json</a>
351 <dd><em class="note">(inherited documentation)</em></dd>
352 </dt>
353 </dl>
354</td></tr></table>
355</div>
356<a name="_refresh"></a>
357<div class="private">
358<table class="details" border="1" cellpadding="3"
359 cellspacing="0" width="100%" bgcolor="white">
360<tr><td>
361 <table width="100%" cellpadding="0" cellspacing="0" border="0">
362 <tr valign="top"><td>
363 <h3 class="epydoc"><span class="sig"><span class="sig-name">_refresh</span>(<span class="sig-arg">self</span>,
364 <span class="sig-arg">http_request</span>)</span>
365 </h3>
366 </td><td align="right" valign="top"
367 ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#AppAssertionCredentials._refresh">source&nbsp;code</a></span>&nbsp;
368 </td>
369 </tr></table>
370
371 <pre class="literalblock">
372Refreshes the access_token.
373
374Since the underlying App Engine app_identity implementation does its own
375caching we can skip all the storage hoops and just to a refresh using the
376API.
377
378Args:
379 http_request: callable, a callable that matches the method signature of
380 httplib2.Http.request, used to make the refresh request.
381
382Raises:
383 AccessTokenRefreshError: When the refresh fails.
384
385</pre>
386 <dl class="fields">
387 <dt>Overrides:
388 <a href="oauth2client.client.OAuth2Credentials-class.html#_refresh" onclick="show_private();">client.OAuth2Credentials._refresh</a>
389 </dt>
390 </dl>
391</td></tr></table>
392</div>
393<br />
394<!-- ==================== NAVIGATION BAR ==================== -->
395<table class="navbar" border="0" width="100%" cellpadding="0"
396 bgcolor="#a0c0ff" cellspacing="0">
397 <tr valign="middle">
398
399 <!-- Tree link -->
400 <th>&nbsp;&nbsp;&nbsp;<a
401 href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
402
403 <!-- Index link -->
404 <th>&nbsp;&nbsp;&nbsp;<a
405 href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
406
407 <!-- Help link -->
408 <th>&nbsp;&nbsp;&nbsp;<a
409 href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
410
411 <th class="navbar" width="100%"></th>
412 </tr>
413</table>
414<table border="0" cellpadding="0" cellspacing="0" width="100%%">
415 <tr>
416 <td align="left" class="footer">
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400417 Generated by Epydoc 3.0.1 on Thu Jul 12 10:44:11 2012
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -0400418 </td>
419 <td align="right" class="footer">
420 <a target="mainFrame" href="http://epydoc.sourceforge.net"
421 >http://epydoc.sourceforge.net</a>
422 </td>
423 </tr>
424</table>
425
426<script type="text/javascript">
427 <!--
428 // Private objects are initially displayed (because if
429 // javascript is turned off then we want them to be
430 // visible); but by default, we want to hide them. So hide
431 // them unless we have a cookie that says to show them.
432 checkCookie();
433 // -->
434</script>
435</body>
436</html>