blob: b7e346b180cde8868a9a437344f6c52c9f4f4583 [file] [log] [blame]
Joe Gregorio1b425aa2012-08-24 12:04:34 -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.gce.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.gce-module.html">Module&nbsp;gce</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.gce.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.gce-pysrc.html#AppAssertionCredentials">source&nbsp;code</a></span></p>
57<center>
58<center> <map id="class_hierarchy_for_appasserti_2" name="class_hierarchy_for_appasserti_2">
59<area shape="rect" href="oauth2client.client.AssertionCredentials-class.html" title="client.AssertionCredentials" alt="" coords="5,117,181,144"/>
60<area shape="rect" href="oauth2client.gce.AppAssertionCredentials-class.html" title="AppAssertionCredentials" alt="" coords="12,173,175,200"/>
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"/>
63</map>
64 <img src="class_hierarchy_for_appasserti_2.gif" alt='' usemap="#class_hierarchy_for_appasserti_2" ismap="ismap" class="graph-without-title" />
65</center>
66</center>
67<hr />
68<pre class="literalblock">
69Credentials object for Compute Engine Assertion Grants
70
71This object will allow a Compute Engine instance to identify itself to
72Google and other OAuth 2.0 servers that can verify assertions. It can be used
73for the purpose of accessing data stored under an account assigned to the
74Compute Engine instance 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.gce.AppAssertionCredentials-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">*args</span>,
106 <span class="summary-sig-arg">**kwargs</span>)</span><br />
107 Constructor for AppAssertionCredentials</td>
108 <td align="right" valign="top">
109 <span class="codelink"><a href="oauth2client.util-pysrc.html">source&nbsp;code</a></span>
110
111 </td>
112 </tr>
113 </table>
114
115 </td>
116 </tr>
117<tr class="private">
118 <td width="15%" align="right" valign="top" class="summary">
119 <span class="summary-type">&nbsp;</span>
120 </td><td class="summary">
121 <table width="100%" cellpadding="0" cellspacing="0" border="0">
122 <tr>
123 <td><span class="summary-sig"><a href="oauth2client.gce.AppAssertionCredentials-class.html#_refresh" class="summary-sig-name" onclick="show_private();">_refresh</a>(<span class="summary-sig-arg">self</span>,
124 <span class="summary-sig-arg">http_request</span>)</span><br />
125 Refreshes the access_token.</td>
126 <td align="right" valign="top">
127 <span class="codelink"><a href="oauth2client.gce-pysrc.html#AppAssertionCredentials._refresh">source&nbsp;code</a></span>
128
129 </td>
130 </tr>
131 </table>
132
133 </td>
134 </tr>
135 <tr>
136 <td colspan="2" class="summary">
137 <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):
138 <code><a href="oauth2client.client.AssertionCredentials-class.html#_generate_assertion" onclick="show_private();">_generate_assertion</a></code>,
139 <code><a href="oauth2client.client.AssertionCredentials-class.html#_generate_refresh_request_body" onclick="show_private();">_generate_refresh_request_body</a></code>
140 </p></div>
141 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.OAuth2Credentials-class.html">client.OAuth2Credentials</a></code></b>:
142 <code><a href="oauth2client.client.OAuth2Credentials-class.html#__getstate__">__getstate__</a></code>,
143 <code><a href="oauth2client.client.OAuth2Credentials-class.html#__setstate__">__setstate__</a></code>,
144 <code><a href="oauth2client.client.OAuth2Credentials-class.html#apply">apply</a></code>,
145 <code><a href="oauth2client.client.OAuth2Credentials-class.html#authorize">authorize</a></code>,
146 <code><a href="oauth2client.client.OAuth2Credentials-class.html#refresh">refresh</a></code>,
147 <code><a href="oauth2client.client.OAuth2Credentials-class.html#set_store">set_store</a></code>,
148 <code><a href="oauth2client.client.OAuth2Credentials-class.html#to_json">to_json</a></code>
149 </p>
150 <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):
151 <code><a href="oauth2client.client.OAuth2Credentials-class.html#_do_refresh_request" onclick="show_private();">_do_refresh_request</a></code>,
152 <code><a href="oauth2client.client.OAuth2Credentials-class.html#_generate_refresh_request_headers" onclick="show_private();">_generate_refresh_request_headers</a></code>,
153 <code><a href="oauth2client.client.OAuth2Credentials-class.html#_updateFromCredential" onclick="show_private();">_updateFromCredential</a></code>
154 </p></div>
155 <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):
156 <code><a href="oauth2client.client.Credentials-class.html#_to_json" onclick="show_private();">_to_json</a></code>
157 </p></div>
158 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
159 <code>__delattr__</code>,
160 <code>__format__</code>,
161 <code>__getattribute__</code>,
162 <code>__hash__</code>,
163 <code>__new__</code>,
164 <code>__reduce__</code>,
165 <code>__reduce_ex__</code>,
166 <code>__repr__</code>,
167 <code>__setattr__</code>,
168 <code>__sizeof__</code>,
169 <code>__str__</code>,
170 <code>__subclasshook__</code>
171 </p>
172 </td>
173 </tr>
174</table>
175<!-- ==================== CLASS METHODS ==================== -->
176<a name="section-ClassMethods"></a>
177<table class="summary" border="1" cellpadding="3"
178 cellspacing="0" width="100%" bgcolor="white">
179<tr bgcolor="#70b0f0" class="table-header">
180 <td colspan="2" class="table-header">
181 <table border="0" cellpadding="0" cellspacing="0" width="100%">
182 <tr valign="top">
183 <td align="left"><span class="table-header">Class Methods</span></td>
184 <td align="right" valign="top"
185 ><span class="options">[<a href="#section-ClassMethods"
186 class="privatelink" onclick="toggle_private();"
187 >hide private</a>]</span></td>
188 </tr>
189 </table>
190 </td>
191</tr>
192<tr>
193 <td width="15%" align="right" valign="top" class="summary">
194 <span class="summary-type">&nbsp;</span>
195 </td><td class="summary">
196 <table width="100%" cellpadding="0" cellspacing="0" border="0">
197 <tr>
198 <td><span class="summary-sig"><a href="oauth2client.gce.AppAssertionCredentials-class.html#from_json" class="summary-sig-name">from_json</a>(<span class="summary-sig-arg">cls</span>,
199 <span class="summary-sig-arg">json</span>)</span><br />
200 Instantiate a Credentials object from a JSON description of it.</td>
201 <td align="right" valign="top">
202 <span class="codelink"><a href="oauth2client.gce-pysrc.html#AppAssertionCredentials.from_json">source&nbsp;code</a></span>
203
204 </td>
205 </tr>
206 </table>
207
208 </td>
209 </tr>
210 <tr>
211 <td colspan="2" class="summary">
212 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.Credentials-class.html">client.Credentials</a></code></b>:
213 <code><a href="oauth2client.client.Credentials-class.html#new_from_json">new_from_json</a></code>
214 </p>
215 </td>
216 </tr>
217</table>
218<!-- ==================== CLASS VARIABLES ==================== -->
219<a name="section-ClassVariables"></a>
220<table class="summary" border="1" cellpadding="3"
221 cellspacing="0" width="100%" bgcolor="white">
222<tr bgcolor="#70b0f0" class="table-header">
223 <td colspan="2" class="table-header">
224 <table border="0" cellpadding="0" cellspacing="0" width="100%">
225 <tr valign="top">
226 <td align="left"><span class="table-header">Class Variables</span></td>
227 <td align="right" valign="top"
228 ><span class="options">[<a href="#section-ClassVariables"
229 class="privatelink" onclick="toggle_private();"
230 >hide private</a>]</span></td>
231 </tr>
232 </table>
233 </td>
234</tr>
235 <tr>
236 <td colspan="2" class="summary">
237 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.Credentials-class.html">client.Credentials</a></code></b>:
238 <code><a href="oauth2client.client.Credentials-class.html#NON_SERIALIZED_MEMBERS">NON_SERIALIZED_MEMBERS</a></code>
239 </p>
240 </td>
241 </tr>
242</table>
243<!-- ==================== PROPERTIES ==================== -->
244<a name="section-Properties"></a>
245<table class="summary" border="1" cellpadding="3"
246 cellspacing="0" width="100%" bgcolor="white">
247<tr bgcolor="#70b0f0" class="table-header">
248 <td colspan="2" class="table-header">
249 <table border="0" cellpadding="0" cellspacing="0" width="100%">
250 <tr valign="top">
251 <td align="left"><span class="table-header">Properties</span></td>
252 <td align="right" valign="top"
253 ><span class="options">[<a href="#section-Properties"
254 class="privatelink" onclick="toggle_private();"
255 >hide private</a>]</span></td>
256 </tr>
257 </table>
258 </td>
259</tr>
260 <tr>
261 <td colspan="2" class="summary">
262 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.OAuth2Credentials-class.html">client.OAuth2Credentials</a></code></b>:
263 <code><a href="oauth2client.client.OAuth2Credentials-class.html#access_token_expired">access_token_expired</a></code>
264 </p>
265 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
266 <code>__class__</code>
267 </p>
268 </td>
269 </tr>
270</table>
271<!-- ==================== METHOD DETAILS ==================== -->
272<a name="section-MethodDetails"></a>
273<table class="details" border="1" cellpadding="3"
274 cellspacing="0" width="100%" bgcolor="white">
275<tr bgcolor="#70b0f0" class="table-header">
276 <td colspan="2" class="table-header">
277 <table border="0" cellpadding="0" cellspacing="0" width="100%">
278 <tr valign="top">
279 <td align="left"><span class="table-header">Method Details</span></td>
280 <td align="right" valign="top"
281 ><span class="options">[<a href="#section-MethodDetails"
282 class="privatelink" onclick="toggle_private();"
283 >hide private</a>]</span></td>
284 </tr>
285 </table>
286 </td>
287</tr>
288</table>
289<a name="__init__"></a>
290<div>
291<table class="details" border="1" cellpadding="3"
292 cellspacing="0" width="100%" bgcolor="white">
293<tr><td>
294 <table width="100%" cellpadding="0" cellspacing="0" border="0">
295 <tr valign="top"><td>
296 <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">*args</span>,
297 <span class="sig-arg">**kwargs</span>)</span>
298 <br /><em class="fname">(Constructor)</em>
299 </h3>
300 </td><td align="right" valign="top"
301 ><span class="codelink"><a href="oauth2client.util-pysrc.html">source&nbsp;code</a></span>&nbsp;
302 </td>
303 </tr></table>
304
305 <pre class="literalblock">
306Constructor for AppAssertionCredentials
307
308Args:
309 scope: string or list of strings, scope(s) of the credentials being
310 requested.
311
312</pre>
313 <dl class="fields">
314 <dt>Decorators:</dt>
315 <dd><ul class="nomargin-top">
316 <li><code>@util.positional(2)</code></li>
317 </ul></dd>
318 <dt>Overrides:
319 object.__init__
320 </dt>
321 </dl>
322</td></tr></table>
323</div>
324<a name="from_json"></a>
325<div>
326<table class="details" border="1" cellpadding="3"
327 cellspacing="0" width="100%" bgcolor="white">
328<tr><td>
329 <table width="100%" cellpadding="0" cellspacing="0" border="0">
330 <tr valign="top"><td>
331 <h3 class="epydoc"><span class="sig"><span class="sig-name">from_json</span>(<span class="sig-arg">cls</span>,
332 <span class="sig-arg">json</span>)</span>
333 <br /><em class="fname">Class Method</em>
334 </h3>
335 </td><td align="right" valign="top"
336 ><span class="codelink"><a href="oauth2client.gce-pysrc.html#AppAssertionCredentials.from_json">source&nbsp;code</a></span>&nbsp;
337 </td>
338 </tr></table>
339
340 <pre class="literalblock">
341Instantiate a Credentials object from a JSON description of it. The JSON
342should have been produced by calling .to_json() on the object.
343
344Args:
345 data: dict, A deserialized JSON object.
346
347Returns:
348 An instance of a Credentials subclass.
349
350</pre>
351 <dl class="fields">
352 <dt>Overrides:
353 <a href="oauth2client.client.Credentials-class.html#from_json">client.Credentials.from_json</a>
354 <dd><em class="note">(inherited documentation)</em></dd>
355 </dt>
356 </dl>
357</td></tr></table>
358</div>
359<a name="_refresh"></a>
360<div class="private">
361<table class="details" border="1" cellpadding="3"
362 cellspacing="0" width="100%" bgcolor="white">
363<tr><td>
364 <table width="100%" cellpadding="0" cellspacing="0" border="0">
365 <tr valign="top"><td>
366 <h3 class="epydoc"><span class="sig"><span class="sig-name">_refresh</span>(<span class="sig-arg">self</span>,
367 <span class="sig-arg">http_request</span>)</span>
368 </h3>
369 </td><td align="right" valign="top"
370 ><span class="codelink"><a href="oauth2client.gce-pysrc.html#AppAssertionCredentials._refresh">source&nbsp;code</a></span>&nbsp;
371 </td>
372 </tr></table>
373
374 <pre class="literalblock">
375Refreshes the access_token.
376
377Skip all the storage hoops and just refresh using the API.
378
379Args:
380 http_request: callable, a callable that matches the method signature of
381 httplib2.Http.request, used to make the refresh request.
382
383Raises:
384 AccessTokenRefreshError: When the refresh fails.
385
386</pre>
387 <dl class="fields">
388 <dt>Overrides:
389 <a href="oauth2client.client.OAuth2Credentials-class.html#_refresh" onclick="show_private();">client.OAuth2Credentials._refresh</a>
390 </dt>
391 </dl>
392</td></tr></table>
393</div>
394<br />
395<!-- ==================== NAVIGATION BAR ==================== -->
396<table class="navbar" border="0" width="100%" cellpadding="0"
397 bgcolor="#a0c0ff" cellspacing="0">
398 <tr valign="middle">
399
400 <!-- Tree link -->
401 <th>&nbsp;&nbsp;&nbsp;<a
402 href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
403
404 <!-- Index link -->
405 <th>&nbsp;&nbsp;&nbsp;<a
406 href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
407
408 <!-- Help link -->
409 <th>&nbsp;&nbsp;&nbsp;<a
410 href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
411
412 <th class="navbar" width="100%"></th>
413 </tr>
414</table>
415<table border="0" cellpadding="0" cellspacing="0" width="100%%">
416 <tr>
417 <td align="left" class="footer">
Joe Gregorio0cd347a2012-08-30 08:22:27 -0400418 Generated by Epydoc 3.0.1 on Thu Aug 30 07:12:47 2012
Joe Gregorio1b425aa2012-08-24 12:04:34 -0400419 </td>
420 <td align="right" class="footer">
421 <a target="mainFrame" href="http://epydoc.sourceforge.net"
422 >http://epydoc.sourceforge.net</a>
423 </td>
424 </tr>
425</table>
426
427<script type="text/javascript">
428 <!--
429 // Private objects are initially displayed (because if
430 // javascript is turned off then we want them to be
431 // visible); but by default, we want to hide them. So hide
432 // them unless we have a cookie that says to show them.
433 checkCookie();
434 // -->
435</script>
436</body>
437</html>