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>googleapiclient._auth</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 <!-- Home link --> 18 <th> <a 19 href="googleapiclient-module.html">Home</a> </th> 20 21 <!-- Tree link --> 22 <th> <a 23 href="module-tree.html">Trees</a> </th> 24 25 <!-- Index link --> 26 <th> <a 27 href="identifier-index.html">Indices</a> </th> 28 29 <!-- Help link --> 30 <th> <a 31 href="help.html">Help</a> </th> 32 33 <th class="navbar" width="100%"></th> 34 </tr> 35</table> 36<table width="100%" cellpadding="0" cellspacing="0"> 37 <tr valign="top"> 38 <td width="100%"> 39 <span class="breadcrumbs"> 40 <a href="googleapiclient-module.html">Package googleapiclient</a> :: 41 Module _auth 42 </span> 43 </td> 44 <td> 45 <table cellpadding="0" cellspacing="0"> 46 <!-- hide/show private --> 47 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" 48 onclick="toggle_private();">hide private</a>]</span></td></tr> 49 <tr><td align="right"><span class="options" 50 >[<a href="frames.html" target="_top">frames</a 51 >] | <a href="googleapiclient._auth-module.html" 52 target="_top">no frames</a>]</span></td></tr> 53 </table> 54 </td> 55 </tr> 56</table> 57<!-- ==================== MODULE DESCRIPTION ==================== --> 58<h1 class="epydoc">Module _auth</h1><p class="nomargin-top"><span class="codelink"><a href="googleapiclient._auth-pysrc.html">source code</a></span></p> 59<pre class="literalblock"> 60Helpers for authentication using oauth2client or google-auth. 61 62</pre> 63 64<!-- ==================== FUNCTIONS ==================== --> 65<a name="section-Functions"></a> 66<table class="summary" border="1" cellpadding="3" 67 cellspacing="0" width="100%" bgcolor="white"> 68<tr bgcolor="#70b0f0" class="table-header"> 69 <td colspan="2" class="table-header"> 70 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 71 <tr valign="top"> 72 <td align="left"><span class="table-header">Functions</span></td> 73 <td align="right" valign="top" 74 ><span class="options">[<a href="#section-Functions" 75 class="privatelink" onclick="toggle_private();" 76 >hide private</a>]</span></td> 77 </tr> 78 </table> 79 </td> 80</tr> 81<tr> 82 <td width="15%" align="right" valign="top" class="summary"> 83 <span class="summary-type"> </span> 84 </td><td class="summary"> 85 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 86 <tr> 87 <td><span class="summary-sig"><a name="default_credentials"></a><span class="summary-sig-name">default_credentials</span>()</span><br /> 88 Returns Application Default Credentials.</td> 89 <td align="right" valign="top"> 90 <span class="codelink"><a href="googleapiclient._auth-pysrc.html#default_credentials">source code</a></span> 91 92 </td> 93 </tr> 94 </table> 95 96 </td> 97 </tr> 98<tr> 99 <td width="15%" align="right" valign="top" class="summary"> 100 <span class="summary-type"> </span> 101 </td><td class="summary"> 102 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 103 <tr> 104 <td><span class="summary-sig"><a href="googleapiclient._auth-module.html#with_scopes" class="summary-sig-name">with_scopes</a>(<span class="summary-sig-arg">credentials</span>, 105 <span class="summary-sig-arg">scopes</span>)</span><br /> 106 Scopes the credentials if necessary.</td> 107 <td align="right" valign="top"> 108 <span class="codelink"><a href="googleapiclient._auth-pysrc.html#with_scopes">source code</a></span> 109 110 </td> 111 </tr> 112 </table> 113 114 </td> 115 </tr> 116<tr> 117 <td width="15%" align="right" valign="top" class="summary"> 118 <span class="summary-type"> </span> 119 </td><td class="summary"> 120 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 121 <tr> 122 <td><span class="summary-sig"><a href="googleapiclient._auth-module.html#authorized_http" class="summary-sig-name">authorized_http</a>(<span class="summary-sig-arg">credentials</span>)</span><br /> 123 Returns an http client that is authorized with the given credentials.</td> 124 <td align="right" valign="top"> 125 <span class="codelink"><a href="googleapiclient._auth-pysrc.html#authorized_http">source code</a></span> 126 127 </td> 128 </tr> 129 </table> 130 131 </td> 132 </tr> 133</table> 134<!-- ==================== VARIABLES ==================== --> 135<a name="section-Variables"></a> 136<table class="summary" border="1" cellpadding="3" 137 cellspacing="0" width="100%" bgcolor="white"> 138<tr bgcolor="#70b0f0" class="table-header"> 139 <td colspan="2" class="table-header"> 140 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 141 <tr valign="top"> 142 <td align="left"><span class="table-header">Variables</span></td> 143 <td align="right" valign="top" 144 ><span class="options">[<a href="#section-Variables" 145 class="privatelink" onclick="toggle_private();" 146 >hide private</a>]</span></td> 147 </tr> 148 </table> 149 </td> 150</tr> 151<tr> 152 <td width="15%" align="right" valign="top" class="summary"> 153 <span class="summary-type"> </span> 154 </td><td class="summary"> 155 <a name="HAS_GOOGLE_AUTH"></a><span class="summary-name">HAS_GOOGLE_AUTH</span> = <code title="False">False</code> 156 </td> 157 </tr> 158<tr> 159 <td width="15%" align="right" valign="top" class="summary"> 160 <span class="summary-type"> </span> 161 </td><td class="summary"> 162 <a name="HAS_OAUTH2CLIENT"></a><span class="summary-name">HAS_OAUTH2CLIENT</span> = <code title="False">False</code> 163 </td> 164 </tr> 165</table> 166<!-- ==================== FUNCTION DETAILS ==================== --> 167<a name="section-FunctionDetails"></a> 168<table class="details" border="1" cellpadding="3" 169 cellspacing="0" width="100%" bgcolor="white"> 170<tr bgcolor="#70b0f0" class="table-header"> 171 <td colspan="2" class="table-header"> 172 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 173 <tr valign="top"> 174 <td align="left"><span class="table-header">Function Details</span></td> 175 <td align="right" valign="top" 176 ><span class="options">[<a href="#section-FunctionDetails" 177 class="privatelink" onclick="toggle_private();" 178 >hide private</a>]</span></td> 179 </tr> 180 </table> 181 </td> 182</tr> 183</table> 184<a name="with_scopes"></a> 185<div> 186<table class="details" border="1" cellpadding="3" 187 cellspacing="0" width="100%" bgcolor="white"> 188<tr><td> 189 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 190 <tr valign="top"><td> 191 <h3 class="epydoc"><span class="sig"><span class="sig-name">with_scopes</span>(<span class="sig-arg">credentials</span>, 192 <span class="sig-arg">scopes</span>)</span> 193 </h3> 194 </td><td align="right" valign="top" 195 ><span class="codelink"><a href="googleapiclient._auth-pysrc.html#with_scopes">source code</a></span> 196 </td> 197 </tr></table> 198 199 <pre class="literalblock"> 200Scopes the credentials if necessary. 201 202Args: 203 credentials (Union[ 204 google.auth.credentials.Credentials, 205 oauth2client.client.Credentials]): The credentials to scope. 206 scopes (Sequence[str]): The list of scopes. 207 208Returns: 209 Union[google.auth.credentials.Credentials, 210 oauth2client.client.Credentials]: The scoped credentials. 211 212</pre> 213 <dl class="fields"> 214 </dl> 215</td></tr></table> 216</div> 217<a name="authorized_http"></a> 218<div> 219<table class="details" border="1" cellpadding="3" 220 cellspacing="0" width="100%" bgcolor="white"> 221<tr><td> 222 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 223 <tr valign="top"><td> 224 <h3 class="epydoc"><span class="sig"><span class="sig-name">authorized_http</span>(<span class="sig-arg">credentials</span>)</span> 225 </h3> 226 </td><td align="right" valign="top" 227 ><span class="codelink"><a href="googleapiclient._auth-pysrc.html#authorized_http">source code</a></span> 228 </td> 229 </tr></table> 230 231 <pre class="literalblock"> 232Returns an http client that is authorized with the given credentials. 233 234Args: 235 credentials (Union[ 236 google.auth.credentials.Credentials, 237 oauth2client.client.Credentials]): The credentials to use. 238 239Returns: 240 Union[httplib2.Http, google_auth_httplib2.AuthorizedHttp]: An 241 authorized http client. 242 243</pre> 244 <dl class="fields"> 245 </dl> 246</td></tr></table> 247</div> 248<br /> 249<!-- ==================== NAVIGATION BAR ==================== --> 250<table class="navbar" border="0" width="100%" cellpadding="0" 251 bgcolor="#a0c0ff" cellspacing="0"> 252 <tr valign="middle"> 253 <!-- Home link --> 254 <th> <a 255 href="googleapiclient-module.html">Home</a> </th> 256 257 <!-- Tree link --> 258 <th> <a 259 href="module-tree.html">Trees</a> </th> 260 261 <!-- Index link --> 262 <th> <a 263 href="identifier-index.html">Indices</a> </th> 264 265 <!-- Help link --> 266 <th> <a 267 href="help.html">Help</a> </th> 268 269 <th class="navbar" width="100%"></th> 270 </tr> 271</table> 272<table border="0" cellpadding="0" cellspacing="0" width="100%%"> 273 <tr> 274 <td align="left" class="footer"> 275 Generated by Epydoc 3.0.1 on Mon Jun 5 13:38:39 2017 276 </td> 277 <td align="right" class="footer"> 278 <a target="mainFrame" href="http://epydoc.sourceforge.net" 279 >http://epydoc.sourceforge.net</a> 280 </td> 281 </tr> 282</table> 283 284<script type="text/javascript"> 285 <!-- 286 // Private objects are initially displayed (because if 287 // javascript is turned off then we want them to be 288 // visible); but by default, we want to hide them. So hide 289 // them unless we have a cookie that says to show them. 290 checkCookie(); 291 // --> 292</script> 293</body> 294</html> 295