Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 1 | <?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.client.Credentials</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> <a |
| 20 | href="module-tree.html">Trees</a> </th> |
| 21 | |
| 22 | <!-- Index link --> |
| 23 | <th> <a |
| 24 | href="identifier-index.html">Indices</a> </th> |
| 25 | |
| 26 | <!-- Help link --> |
| 27 | <th> <a |
| 28 | href="help.html">Help</a> </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 oauth2client</a> :: |
| 38 | <a href="oauth2client.client-module.html">Module client</a> :: |
| 39 | Class Credentials |
| 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 private</a>]</span></td></tr> |
| 47 | <tr><td align="right"><span class="options" |
| 48 | >[<a href="frames.html" target="_top">frames</a |
| 49 | >] | <a href="oauth2client.client.Credentials-class.html" |
| 50 | target="_top">no frames</a>]</span></td></tr> |
| 51 | </table> |
| 52 | </td> |
| 53 | </tr> |
| 54 | </table> |
| 55 | <!-- ==================== CLASS DESCRIPTION ==================== --> |
| 56 | <h1 class="epydoc">Class Credentials</h1><p class="nomargin-top"><span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials">source code</a></span></p> |
| 57 | <center> |
Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame] | 58 | <center> <map id="uml_class_diagram_for_oauth2cl_19" name="uml_class_diagram_for_oauth2cl_19"> |
| 59 | <area shape="rect" id="node146" href="oauth2client.client.Credentials-class.html#NON_SERIALIZED_MEMBERS" title="oauth2client.client.Credentials.NON_SERIALIZED_MEMBERS" alt="" coords="17,31,216,49"/> |
| 60 | <area shape="rect" id="node146" href="oauth2client.client.Credentials-class.html#authorize" title="Take an httplib2.Http instance (or equivalent) and authorizes it." alt="" coords="17,52,216,71"/> |
| 61 | <area shape="rect" id="node146" href="oauth2client.client.Credentials-class.html#refresh" title="Forces a refresh of the access_token." alt="" coords="17,71,216,89"/> |
| 62 | <area shape="rect" id="node146" href="oauth2client.client.Credentials-class.html#revoke" title="Revokes a refresh_token and makes the credentials void." alt="" coords="17,89,216,108"/> |
| 63 | <area shape="rect" id="node146" href="oauth2client.client.Credentials-class.html#apply" title="Add the authorization to the headers." alt="" coords="17,108,216,127"/> |
| 64 | <area shape="rect" id="node146" href="oauth2client.client.Credentials-class.html#to_json" title="Creating a JSON representation of an instance of Credentials." alt="" coords="17,127,216,145"/> |
| 65 | <area shape="rect" id="node146" href="oauth2client.client.Credentials-class.html#new_from_json" title="Utility class method to instantiate a Credentials subclass from a JSON representation produced by to_json()." alt="" coords="17,145,216,164"/> |
| 66 | <area shape="rect" id="node146" href="oauth2client.client.Credentials-class.html#from_json" title="Instantiate a Credentials object from a JSON description of it." alt="" coords="17,164,216,183"/> |
| 67 | <area shape="rect" id="node1" href="oauth2client.client.Credentials-class.html" title="Base class for all Credentials objects." alt="" coords="5,6,227,189"/> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 68 | </map> |
Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame] | 69 | <img src="uml_class_diagram_for_oauth2cl_19.gif" alt='' usemap="#uml_class_diagram_for_oauth2cl_19" ismap="ismap" class="graph-without-title" /> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 70 | </center> |
| 71 | </center> |
| 72 | <hr /> |
| 73 | <pre class="literalblock"> |
| 74 | Base class for all Credentials objects. |
| 75 | |
| 76 | Subclasses must define an authorize() method that applies the credentials to |
| 77 | an HTTP transport. |
| 78 | |
| 79 | Subclasses must also specify a classmethod named 'from_json' that takes a JSON |
| 80 | string as input and returns an instaniated Credentials object. |
| 81 | |
| 82 | </pre> |
| 83 | |
| 84 | <!-- ==================== INSTANCE METHODS ==================== --> |
| 85 | <a name="section-InstanceMethods"></a> |
| 86 | <table class="summary" border="1" cellpadding="3" |
| 87 | cellspacing="0" width="100%" bgcolor="white"> |
| 88 | <tr bgcolor="#70b0f0" class="table-header"> |
| 89 | <td colspan="2" class="table-header"> |
| 90 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 91 | <tr valign="top"> |
| 92 | <td align="left"><span class="table-header">Instance Methods</span></td> |
| 93 | <td align="right" valign="top" |
| 94 | ><span class="options">[<a href="#section-InstanceMethods" |
| 95 | class="privatelink" onclick="toggle_private();" |
| 96 | >hide private</a>]</span></td> |
| 97 | </tr> |
| 98 | </table> |
| 99 | </td> |
| 100 | </tr> |
| 101 | <tr> |
| 102 | <td width="15%" align="right" valign="top" class="summary"> |
| 103 | <span class="summary-type"> </span> |
| 104 | </td><td class="summary"> |
| 105 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 106 | <tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 107 | <td><span class="summary-sig"><a href="oauth2client.client.Credentials-class.html#authorize" class="summary-sig-name">authorize</a>(<span class="summary-sig-arg">self</span>, |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 108 | <span class="summary-sig-arg">http</span>)</span><br /> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 109 | Take an httplib2.Http instance (or equivalent) and authorizes it.</td> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 110 | <td align="right" valign="top"> |
| 111 | <span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.authorize">source code</a></span> |
| 112 | |
| 113 | </td> |
| 114 | </tr> |
| 115 | </table> |
| 116 | |
| 117 | </td> |
| 118 | </tr> |
| 119 | <tr> |
| 120 | <td width="15%" align="right" valign="top" class="summary"> |
| 121 | <span class="summary-type"> </span> |
| 122 | </td><td class="summary"> |
| 123 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 124 | <tr> |
| 125 | <td><span class="summary-sig"><a href="oauth2client.client.Credentials-class.html#refresh" class="summary-sig-name">refresh</a>(<span class="summary-sig-arg">self</span>, |
| 126 | <span class="summary-sig-arg">http</span>)</span><br /> |
| 127 | Forces a refresh of the access_token.</td> |
| 128 | <td align="right" valign="top"> |
| 129 | <span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.refresh">source code</a></span> |
| 130 | |
| 131 | </td> |
| 132 | </tr> |
| 133 | </table> |
| 134 | |
| 135 | </td> |
| 136 | </tr> |
| 137 | <tr> |
| 138 | <td width="15%" align="right" valign="top" class="summary"> |
| 139 | <span class="summary-type"> </span> |
| 140 | </td><td class="summary"> |
| 141 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 142 | <tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 143 | <td><span class="summary-sig"><a href="oauth2client.client.Credentials-class.html#revoke" class="summary-sig-name">revoke</a>(<span class="summary-sig-arg">self</span>, |
| 144 | <span class="summary-sig-arg">http</span>)</span><br /> |
| 145 | Revokes a refresh_token and makes the credentials void.</td> |
| 146 | <td align="right" valign="top"> |
| 147 | <span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.revoke">source code</a></span> |
| 148 | |
| 149 | </td> |
| 150 | </tr> |
| 151 | </table> |
| 152 | |
| 153 | </td> |
| 154 | </tr> |
| 155 | <tr> |
| 156 | <td width="15%" align="right" valign="top" class="summary"> |
| 157 | <span class="summary-type"> </span> |
| 158 | </td><td class="summary"> |
| 159 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 160 | <tr> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 161 | <td><span class="summary-sig"><a href="oauth2client.client.Credentials-class.html#apply" class="summary-sig-name">apply</a>(<span class="summary-sig-arg">self</span>, |
| 162 | <span class="summary-sig-arg">headers</span>)</span><br /> |
| 163 | Add the authorization to the headers.</td> |
| 164 | <td align="right" valign="top"> |
| 165 | <span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.apply">source code</a></span> |
| 166 | |
| 167 | </td> |
| 168 | </tr> |
| 169 | </table> |
| 170 | |
| 171 | </td> |
| 172 | </tr> |
| 173 | <tr class="private"> |
| 174 | <td width="15%" align="right" valign="top" class="summary"> |
| 175 | <span class="summary-type"> </span> |
| 176 | </td><td class="summary"> |
| 177 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 178 | <tr> |
| 179 | <td><span class="summary-sig"><a href="oauth2client.client.Credentials-class.html#_to_json" class="summary-sig-name" onclick="show_private();">_to_json</a>(<span class="summary-sig-arg">self</span>, |
| 180 | <span class="summary-sig-arg">strip</span>)</span><br /> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 181 | Utility function that creates JSON repr.</td> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 182 | <td align="right" valign="top"> |
| 183 | <span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials._to_json">source code</a></span> |
| 184 | |
| 185 | </td> |
| 186 | </tr> |
| 187 | </table> |
| 188 | |
| 189 | </td> |
| 190 | </tr> |
| 191 | <tr> |
| 192 | <td width="15%" align="right" valign="top" class="summary"> |
| 193 | <span class="summary-type"> </span> |
| 194 | </td><td class="summary"> |
| 195 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 196 | <tr> |
| 197 | <td><span class="summary-sig"><a href="oauth2client.client.Credentials-class.html#to_json" class="summary-sig-name">to_json</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| 198 | Creating a JSON representation of an instance of Credentials.</td> |
| 199 | <td align="right" valign="top"> |
| 200 | <span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.to_json">source code</a></span> |
| 201 | |
| 202 | </td> |
| 203 | </tr> |
| 204 | </table> |
| 205 | |
| 206 | </td> |
| 207 | </tr> |
| 208 | <tr> |
| 209 | <td colspan="2" class="summary"> |
| 210 | <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| 211 | <code>__delattr__</code>, |
| 212 | <code>__format__</code>, |
| 213 | <code>__getattribute__</code>, |
| 214 | <code>__hash__</code>, |
| 215 | <code>__init__</code>, |
| 216 | <code>__new__</code>, |
| 217 | <code>__reduce__</code>, |
| 218 | <code>__reduce_ex__</code>, |
| 219 | <code>__repr__</code>, |
| 220 | <code>__setattr__</code>, |
| 221 | <code>__sizeof__</code>, |
| 222 | <code>__str__</code>, |
| 223 | <code>__subclasshook__</code> |
| 224 | </p> |
| 225 | </td> |
| 226 | </tr> |
| 227 | </table> |
| 228 | <!-- ==================== CLASS METHODS ==================== --> |
| 229 | <a name="section-ClassMethods"></a> |
| 230 | <table class="summary" border="1" cellpadding="3" |
| 231 | cellspacing="0" width="100%" bgcolor="white"> |
| 232 | <tr bgcolor="#70b0f0" class="table-header"> |
| 233 | <td colspan="2" class="table-header"> |
| 234 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 235 | <tr valign="top"> |
| 236 | <td align="left"><span class="table-header">Class Methods</span></td> |
| 237 | <td align="right" valign="top" |
| 238 | ><span class="options">[<a href="#section-ClassMethods" |
| 239 | class="privatelink" onclick="toggle_private();" |
| 240 | >hide private</a>]</span></td> |
| 241 | </tr> |
| 242 | </table> |
| 243 | </td> |
| 244 | </tr> |
| 245 | <tr> |
| 246 | <td width="15%" align="right" valign="top" class="summary"> |
| 247 | <span class="summary-type"> </span> |
| 248 | </td><td class="summary"> |
| 249 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 250 | <tr> |
| 251 | <td><span class="summary-sig"><a href="oauth2client.client.Credentials-class.html#new_from_json" class="summary-sig-name">new_from_json</a>(<span class="summary-sig-arg">cls</span>, |
| 252 | <span class="summary-sig-arg">s</span>)</span><br /> |
| 253 | Utility class method to instantiate a Credentials subclass from a JSON |
| 254 | representation produced by to_json().</td> |
| 255 | <td align="right" valign="top"> |
| 256 | <span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.new_from_json">source code</a></span> |
| 257 | |
| 258 | </td> |
| 259 | </tr> |
| 260 | </table> |
| 261 | |
| 262 | </td> |
| 263 | </tr> |
| 264 | <tr> |
| 265 | <td width="15%" align="right" valign="top" class="summary"> |
| 266 | <span class="summary-type"> </span> |
| 267 | </td><td class="summary"> |
| 268 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 269 | <tr> |
| 270 | <td><span class="summary-sig"><a href="oauth2client.client.Credentials-class.html#from_json" class="summary-sig-name">from_json</a>(<span class="summary-sig-arg">cls</span>, |
| 271 | <span class="summary-sig-arg">s</span>)</span><br /> |
| 272 | Instantiate a Credentials object from a JSON description of it.</td> |
| 273 | <td align="right" valign="top"> |
| 274 | <span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.from_json">source code</a></span> |
| 275 | |
| 276 | </td> |
| 277 | </tr> |
| 278 | </table> |
| 279 | |
| 280 | </td> |
| 281 | </tr> |
| 282 | </table> |
| 283 | <!-- ==================== CLASS VARIABLES ==================== --> |
| 284 | <a name="section-ClassVariables"></a> |
| 285 | <table class="summary" border="1" cellpadding="3" |
| 286 | cellspacing="0" width="100%" bgcolor="white"> |
| 287 | <tr bgcolor="#70b0f0" class="table-header"> |
| 288 | <td colspan="2" class="table-header"> |
| 289 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 290 | <tr valign="top"> |
| 291 | <td align="left"><span class="table-header">Class Variables</span></td> |
| 292 | <td align="right" valign="top" |
| 293 | ><span class="options">[<a href="#section-ClassVariables" |
| 294 | class="privatelink" onclick="toggle_private();" |
| 295 | >hide private</a>]</span></td> |
| 296 | </tr> |
| 297 | </table> |
| 298 | </td> |
| 299 | </tr> |
| 300 | <tr> |
| 301 | <td width="15%" align="right" valign="top" class="summary"> |
| 302 | <span class="summary-type"> </span> |
| 303 | </td><td class="summary"> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 304 | <a name="NON_SERIALIZED_MEMBERS"></a><span class="summary-name">NON_SERIALIZED_MEMBERS</span> = <code title="['store']">['store']</code> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 305 | </td> |
| 306 | </tr> |
| 307 | </table> |
| 308 | <!-- ==================== PROPERTIES ==================== --> |
| 309 | <a name="section-Properties"></a> |
| 310 | <table class="summary" border="1" cellpadding="3" |
| 311 | cellspacing="0" width="100%" bgcolor="white"> |
| 312 | <tr bgcolor="#70b0f0" class="table-header"> |
| 313 | <td colspan="2" class="table-header"> |
| 314 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 315 | <tr valign="top"> |
| 316 | <td align="left"><span class="table-header">Properties</span></td> |
| 317 | <td align="right" valign="top" |
| 318 | ><span class="options">[<a href="#section-Properties" |
| 319 | class="privatelink" onclick="toggle_private();" |
| 320 | >hide private</a>]</span></td> |
| 321 | </tr> |
| 322 | </table> |
| 323 | </td> |
| 324 | </tr> |
| 325 | <tr> |
| 326 | <td colspan="2" class="summary"> |
| 327 | <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| 328 | <code>__class__</code> |
| 329 | </p> |
| 330 | </td> |
| 331 | </tr> |
| 332 | </table> |
| 333 | <!-- ==================== METHOD DETAILS ==================== --> |
| 334 | <a name="section-MethodDetails"></a> |
| 335 | <table class="details" border="1" cellpadding="3" |
| 336 | cellspacing="0" width="100%" bgcolor="white"> |
| 337 | <tr bgcolor="#70b0f0" class="table-header"> |
| 338 | <td colspan="2" class="table-header"> |
| 339 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 340 | <tr valign="top"> |
| 341 | <td align="left"><span class="table-header">Method Details</span></td> |
| 342 | <td align="right" valign="top" |
| 343 | ><span class="options">[<a href="#section-MethodDetails" |
| 344 | class="privatelink" onclick="toggle_private();" |
| 345 | >hide private</a>]</span></td> |
| 346 | </tr> |
| 347 | </table> |
| 348 | </td> |
| 349 | </tr> |
| 350 | </table> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 351 | <a name="authorize"></a> |
| 352 | <div> |
| 353 | <table class="details" border="1" cellpadding="3" |
| 354 | cellspacing="0" width="100%" bgcolor="white"> |
| 355 | <tr><td> |
| 356 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 357 | <tr valign="top"><td> |
| 358 | <h3 class="epydoc"><span class="sig"><span class="sig-name">authorize</span>(<span class="sig-arg">self</span>, |
| 359 | <span class="sig-arg">http</span>)</span> |
| 360 | </h3> |
| 361 | </td><td align="right" valign="top" |
| 362 | ><span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.authorize">source code</a></span> |
| 363 | </td> |
| 364 | </tr></table> |
| 365 | |
| 366 | <pre class="literalblock"> |
| 367 | Take an httplib2.Http instance (or equivalent) and authorizes it. |
| 368 | |
| 369 | Authorizes it for the set of credentials, usually by replacing |
| 370 | http.request() with a method that adds in the appropriate headers and then |
| 371 | delegates to the original Http.request() method. |
| 372 | |
| 373 | Args: |
| 374 | http: httplib2.Http, an http object to be used to make the refresh |
| 375 | request. |
| 376 | |
| 377 | </pre> |
| 378 | <dl class="fields"> |
| 379 | </dl> |
| 380 | </td></tr></table> |
| 381 | </div> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 382 | <a name="refresh"></a> |
| 383 | <div> |
| 384 | <table class="details" border="1" cellpadding="3" |
| 385 | cellspacing="0" width="100%" bgcolor="white"> |
| 386 | <tr><td> |
| 387 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 388 | <tr valign="top"><td> |
| 389 | <h3 class="epydoc"><span class="sig"><span class="sig-name">refresh</span>(<span class="sig-arg">self</span>, |
| 390 | <span class="sig-arg">http</span>)</span> |
| 391 | </h3> |
| 392 | </td><td align="right" valign="top" |
| 393 | ><span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.refresh">source code</a></span> |
| 394 | </td> |
| 395 | </tr></table> |
| 396 | |
| 397 | <pre class="literalblock"> |
| 398 | Forces a refresh of the access_token. |
| 399 | |
| 400 | Args: |
| 401 | http: httplib2.Http, an http object to be used to make the refresh |
| 402 | request. |
| 403 | |
| 404 | </pre> |
| 405 | <dl class="fields"> |
| 406 | </dl> |
| 407 | </td></tr></table> |
| 408 | </div> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 409 | <a name="revoke"></a> |
| 410 | <div> |
| 411 | <table class="details" border="1" cellpadding="3" |
| 412 | cellspacing="0" width="100%" bgcolor="white"> |
| 413 | <tr><td> |
| 414 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 415 | <tr valign="top"><td> |
| 416 | <h3 class="epydoc"><span class="sig"><span class="sig-name">revoke</span>(<span class="sig-arg">self</span>, |
| 417 | <span class="sig-arg">http</span>)</span> |
| 418 | </h3> |
| 419 | </td><td align="right" valign="top" |
| 420 | ><span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.revoke">source code</a></span> |
| 421 | </td> |
| 422 | </tr></table> |
| 423 | |
| 424 | <pre class="literalblock"> |
| 425 | Revokes a refresh_token and makes the credentials void. |
| 426 | |
| 427 | Args: |
| 428 | http: httplib2.Http, an http object to be used to make the revoke |
| 429 | request. |
| 430 | |
| 431 | </pre> |
| 432 | <dl class="fields"> |
| 433 | </dl> |
| 434 | </td></tr></table> |
| 435 | </div> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 436 | <a name="apply"></a> |
| 437 | <div> |
| 438 | <table class="details" border="1" cellpadding="3" |
| 439 | cellspacing="0" width="100%" bgcolor="white"> |
| 440 | <tr><td> |
| 441 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 442 | <tr valign="top"><td> |
| 443 | <h3 class="epydoc"><span class="sig"><span class="sig-name">apply</span>(<span class="sig-arg">self</span>, |
| 444 | <span class="sig-arg">headers</span>)</span> |
| 445 | </h3> |
| 446 | </td><td align="right" valign="top" |
| 447 | ><span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.apply">source code</a></span> |
| 448 | </td> |
| 449 | </tr></table> |
| 450 | |
| 451 | <pre class="literalblock"> |
| 452 | Add the authorization to the headers. |
| 453 | |
| 454 | Args: |
| 455 | headers: dict, the headers to add the Authorization header to. |
| 456 | |
| 457 | </pre> |
| 458 | <dl class="fields"> |
| 459 | </dl> |
| 460 | </td></tr></table> |
| 461 | </div> |
| 462 | <a name="_to_json"></a> |
| 463 | <div class="private"> |
| 464 | <table class="details" border="1" cellpadding="3" |
| 465 | cellspacing="0" width="100%" bgcolor="white"> |
| 466 | <tr><td> |
| 467 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 468 | <tr valign="top"><td> |
| 469 | <h3 class="epydoc"><span class="sig"><span class="sig-name">_to_json</span>(<span class="sig-arg">self</span>, |
| 470 | <span class="sig-arg">strip</span>)</span> |
| 471 | </h3> |
| 472 | </td><td align="right" valign="top" |
| 473 | ><span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials._to_json">source code</a></span> |
| 474 | </td> |
| 475 | </tr></table> |
| 476 | |
| 477 | <pre class="literalblock"> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 478 | Utility function that creates JSON repr. of a Credentials object. |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 479 | |
| 480 | Args: |
| 481 | strip: array, An array of names of members to not include in the JSON. |
| 482 | |
| 483 | Returns: |
| 484 | string, a JSON representation of this instance, suitable to pass to |
| 485 | from_json(). |
| 486 | |
| 487 | </pre> |
| 488 | <dl class="fields"> |
| 489 | </dl> |
| 490 | </td></tr></table> |
| 491 | </div> |
| 492 | <a name="to_json"></a> |
| 493 | <div> |
| 494 | <table class="details" border="1" cellpadding="3" |
| 495 | cellspacing="0" width="100%" bgcolor="white"> |
| 496 | <tr><td> |
| 497 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 498 | <tr valign="top"><td> |
| 499 | <h3 class="epydoc"><span class="sig"><span class="sig-name">to_json</span>(<span class="sig-arg">self</span>)</span> |
| 500 | </h3> |
| 501 | </td><td align="right" valign="top" |
| 502 | ><span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.to_json">source code</a></span> |
| 503 | </td> |
| 504 | </tr></table> |
| 505 | |
| 506 | <pre class="literalblock"> |
| 507 | Creating a JSON representation of an instance of Credentials. |
| 508 | |
| 509 | Returns: |
| 510 | string, a JSON representation of this instance, suitable to pass to |
| 511 | from_json(). |
| 512 | |
| 513 | </pre> |
| 514 | <dl class="fields"> |
| 515 | </dl> |
| 516 | </td></tr></table> |
| 517 | </div> |
| 518 | <a name="new_from_json"></a> |
| 519 | <div> |
| 520 | <table class="details" border="1" cellpadding="3" |
| 521 | cellspacing="0" width="100%" bgcolor="white"> |
| 522 | <tr><td> |
| 523 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 524 | <tr valign="top"><td> |
| 525 | <h3 class="epydoc"><span class="sig"><span class="sig-name">new_from_json</span>(<span class="sig-arg">cls</span>, |
| 526 | <span class="sig-arg">s</span>)</span> |
| 527 | <br /><em class="fname">Class Method</em> |
| 528 | </h3> |
| 529 | </td><td align="right" valign="top" |
| 530 | ><span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.new_from_json">source code</a></span> |
| 531 | </td> |
| 532 | </tr></table> |
| 533 | |
| 534 | <pre class="literalblock"> |
| 535 | Utility class method to instantiate a Credentials subclass from a JSON |
| 536 | representation produced by to_json(). |
| 537 | |
| 538 | Args: |
| 539 | s: string, JSON from to_json(). |
| 540 | |
| 541 | Returns: |
| 542 | An instance of the subclass of Credentials that was serialized with |
| 543 | to_json(). |
| 544 | |
| 545 | </pre> |
| 546 | <dl class="fields"> |
| 547 | </dl> |
| 548 | </td></tr></table> |
| 549 | </div> |
| 550 | <a name="from_json"></a> |
| 551 | <div> |
| 552 | <table class="details" border="1" cellpadding="3" |
| 553 | cellspacing="0" width="100%" bgcolor="white"> |
| 554 | <tr><td> |
| 555 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 556 | <tr valign="top"><td> |
| 557 | <h3 class="epydoc"><span class="sig"><span class="sig-name">from_json</span>(<span class="sig-arg">cls</span>, |
| 558 | <span class="sig-arg">s</span>)</span> |
| 559 | <br /><em class="fname">Class Method</em> |
| 560 | </h3> |
| 561 | </td><td align="right" valign="top" |
| 562 | ><span class="codelink"><a href="oauth2client.client-pysrc.html#Credentials.from_json">source code</a></span> |
| 563 | </td> |
| 564 | </tr></table> |
| 565 | |
| 566 | <pre class="literalblock"> |
| 567 | Instantiate a Credentials object from a JSON description of it. |
| 568 | |
| 569 | The JSON should have been produced by calling .to_json() on the object. |
| 570 | |
| 571 | Args: |
| 572 | data: dict, A deserialized JSON object. |
| 573 | |
| 574 | Returns: |
| 575 | An instance of a Credentials subclass. |
| 576 | |
| 577 | </pre> |
| 578 | <dl class="fields"> |
| 579 | </dl> |
| 580 | </td></tr></table> |
| 581 | </div> |
| 582 | <br /> |
| 583 | <!-- ==================== NAVIGATION BAR ==================== --> |
| 584 | <table class="navbar" border="0" width="100%" cellpadding="0" |
| 585 | bgcolor="#a0c0ff" cellspacing="0"> |
| 586 | <tr valign="middle"> |
| 587 | |
| 588 | <!-- Tree link --> |
| 589 | <th> <a |
| 590 | href="module-tree.html">Trees</a> </th> |
| 591 | |
| 592 | <!-- Index link --> |
| 593 | <th> <a |
| 594 | href="identifier-index.html">Indices</a> </th> |
| 595 | |
| 596 | <!-- Help link --> |
| 597 | <th> <a |
| 598 | href="help.html">Help</a> </th> |
| 599 | |
| 600 | <th class="navbar" width="100%"></th> |
| 601 | </tr> |
| 602 | </table> |
| 603 | <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
| 604 | <tr> |
| 605 | <td align="left" class="footer"> |
Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame] | 606 | Generated by Epydoc 3.0.1 on Tue Aug 6 12:16:45 2013 |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 607 | </td> |
| 608 | <td align="right" class="footer"> |
| 609 | <a target="mainFrame" href="http://epydoc.sourceforge.net" |
| 610 | >http://epydoc.sourceforge.net</a> |
| 611 | </td> |
| 612 | </tr> |
| 613 | </table> |
| 614 | |
| 615 | <script type="text/javascript"> |
| 616 | <!-- |
| 617 | // Private objects are initially displayed (because if |
| 618 | // javascript is turned off then we want them to be |
| 619 | // visible); but by default, we want to hide them. So hide |
| 620 | // them unless we have a cookie that says to show them. |
| 621 | checkCookie(); |
| 622 | // --> |
| 623 | </script> |
| 624 | </body> |
| 625 | </html> |