Files
deb-python-oauth2client/docs/epy/oauth2client.client.GoogleCredentials-class.html
2014-11-13 12:50:48 -08:00

652 lines
29 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.client.GoogleCredentials</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">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="oauth2client-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- 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.client-module.html">Module&nbsp;client</a> ::
Class&nbsp;GoogleCredentials
</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.client.GoogleCredentials-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class GoogleCredentials</h1><p class="nomargin-top"><span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials">source&nbsp;code</a></span></p>
<center>
<center> <map id="uml_class_diagram_for_oauth2cl_25" name="uml_class_diagram_for_oauth2cl_25">
<area shape="rect" id="node1_19" href="oauth2client.client.GoogleCredentials-class.html#__init__" title="Create an instance of GoogleCredentials." alt="" coords="18,385,862,404"/>
<area shape="rect" id="node1_20" href="oauth2client.client.GoogleCredentials-class.html#create_scoped_required" title="Whether this Credentials object is scopeless." alt="" coords="18,404,862,423"/>
<area shape="rect" id="node1_21" href="oauth2client.client.GoogleCredentials-class.html#create_scoped" title="Create a Credentials object for the given scopes." alt="" coords="18,423,862,441"/>
<area shape="rect" id="node1_22" href="oauth2client.client.GoogleCredentials-class.html#serialization_data" title="Get the fields and their values identifying the current credentials." alt="" coords="18,441,862,460"/>
<area shape="rect" id="node1_23" href="oauth2client.client.GoogleCredentials-class.html#get_application_default" title="Get the Application Default Credentials for the current environment." alt="" coords="18,460,862,479"/>
<area shape="rect" id="node1_24" href="oauth2client.client.GoogleCredentials-class.html#from_stream" title="Create a Credentials object by reading the information from a given file." alt="" coords="18,479,862,497"/>
<area shape="rect" id="node1" href="oauth2client.client.GoogleCredentials-class.html" title="Application Default Credentials for use in calling Google APIs." alt="" coords="5,355,873,504"/>
<area shape="rect" id="node2_25" href="oauth2client.client.OAuth2Credentials-class.html#authorize" title="Authorize an httplib2.Http instance with these credentials." alt="" coords="335,124,546,143"/>
<area shape="rect" id="node2_26" href="oauth2client.client.OAuth2Credentials-class.html#refresh" title="Forces a refresh of the access_token." alt="" coords="335,143,546,161"/>
<area shape="rect" id="node2_27" href="oauth2client.client.OAuth2Credentials-class.html#revoke" title="Revokes a refresh_token and makes the credentials void." alt="" coords="335,161,546,180"/>
<area shape="rect" id="node2_28" href="oauth2client.client.OAuth2Credentials-class.html#apply" title="Add the authorization to the headers." alt="" coords="335,180,546,199"/>
<area shape="rect" id="node2_29" href="oauth2client.client.OAuth2Credentials-class.html#to_json" title="Creating a JSON representation of an instance of Credentials." alt="" coords="335,199,546,217"/>
<area shape="rect" id="node2_30" href="oauth2client.client.OAuth2Credentials-class.html#from_json" title="Instantiate a Credentials object from a JSON description of it." alt="" coords="335,217,546,236"/>
<area shape="rect" id="node2_31" href="oauth2client.client.OAuth2Credentials-class.html#access_token_expired" title="True if the credential is expired or invalid." alt="" coords="335,236,546,255"/>
<area shape="rect" id="node2_32" href="oauth2client.client.OAuth2Credentials-class.html#get_access_token" title="Return the access token and its expiration information." alt="" coords="335,255,546,273"/>
<area shape="rect" id="node2_33" href="oauth2client.client.OAuth2Credentials-class.html#set_store" title="Set the Storage for the credential." alt="" coords="335,273,546,292"/>
<area shape="rect" id="node2_34" href="oauth2client.client.OAuth2Credentials-class.html#__getstate__" title="Trim the state down to something that can be pickled." alt="" coords="335,292,546,311"/>
<area shape="rect" id="node2_35" href="oauth2client.client.OAuth2Credentials-class.html#__setstate__" title="Reconstitute the state of the object from being pickled." alt="" coords="335,311,546,329"/>
<area shape="rect" id="node2" href="oauth2client.client.OAuth2Credentials-class.html" title="Credentials object for OAuth 2.0." alt="" coords="323,93,558,336"/>
<area shape="rect" id="node3_36" href="oauth2client.client.Credentials-class.html#NON_SERIALIZED_MEMBERS" title="oauth2client.client.Credentials.NON_SERIALIZED_MEMBERS" alt="" coords="343,28,538,47"/>
<area shape="rect" id="node3_37" 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="343,49,538,68"/>
<area shape="rect" id="node3" href="oauth2client.client.Credentials-class.html" title="Base class for all Credentials objects." alt="" coords="331,5,550,75"/>
</map>
<img src="uml_class_diagram_for_oauth2cl_25.gif" alt='' usemap="#uml_class_diagram_for_oauth2cl_25" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<pre class="literalblock">
Application Default Credentials for use in calling Google APIs.
The Application Default Credentials are being constructed as a function of
the environment where the code is being run.
More details can be found on this page:
https://developers.google.com/accounts/docs/application-default-credentials
Here is an example of how to use the Application Default Credentials for a
service that requires authentication:
&lt;code&gt;
from __future__ import print_function # unnecessary in python3
from googleapiclient.discovery import build
from oauth2client.client import GoogleCredentials
PROJECT = 'bamboo-machine-422' # replace this with one of your projects
ZONE = 'us-central1-a' # replace this with the zone you care about
credentials = GoogleCredentials.get_application_default()
service = build('compute', 'v1', credentials=credentials)
request = service.instances().list(project=PROJECT, zone=ZONE)
response = request.execute()
print(response)
&lt;/code&gt;
A service that does not require authentication does not need credentials
to be passed in:
&lt;code&gt;
from googleapiclient.discovery import build
service = build('discovery', 'v1')
request = service.apis().list()
response = request.execute()
print(response)
&lt;/code&gt;
</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.client.GoogleCredentials-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">access_token</span>,
<span class="summary-sig-arg">client_id</span>,
<span class="summary-sig-arg">client_secret</span>,
<span class="summary-sig-arg">refresh_token</span>,
<span class="summary-sig-arg">token_expiry</span>,
<span class="summary-sig-arg">token_uri</span>,
<span class="summary-sig-arg">user_agent</span>,
<span class="summary-sig-arg">revoke_uri</span>=<span class="summary-sig-default">GOOGLE_REVOKE_URI</span>)</span><br />
Create an instance of GoogleCredentials.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.__init__">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.client.GoogleCredentials-class.html#create_scoped_required" class="summary-sig-name">create_scoped_required</a>(<span class="summary-sig-arg">self</span>)</span><br />
Whether this Credentials object is scopeless.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.create_scoped_required">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.client.GoogleCredentials-class.html#create_scoped" class="summary-sig-name">create_scoped</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">scopes</span>)</span><br />
Create a Credentials object for the given scopes.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.create_scoped">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.client.GoogleCredentials-class.html#serialization_data" class="summary-sig-name">serialization_data</a>(<span class="summary-sig-arg">self</span>)</span><br />
Get the fields and their values identifying the current credentials.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.serialization_data">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><a href="oauth2client.client.OAuth2Credentials-class.html">OAuth2Credentials</a></code></b>:
<code><a href="oauth2client.client.OAuth2Credentials-class.html#__getstate__">__getstate__</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#__setstate__">__setstate__</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#access_token_expired">access_token_expired</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#apply">apply</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#authorize">authorize</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#get_access_token">get_access_token</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#refresh">refresh</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#revoke">revoke</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#set_store">set_store</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#to_json">to_json</a></code>
</p>
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.OAuth2Credentials-class.html">OAuth2Credentials</a></code></b> (private):
<code><a href="oauth2client.client.OAuth2Credentials-class.html#_do_refresh_request" onclick="show_private();">_do_refresh_request</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#_do_revoke" onclick="show_private();">_do_revoke</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#_expires_in" onclick="show_private();">_expires_in</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#_generate_refresh_request_body" onclick="show_private();">_generate_refresh_request_body</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#_generate_refresh_request_headers" onclick="show_private();">_generate_refresh_request_headers</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#_refresh" onclick="show_private();">_refresh</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#_revoke" onclick="show_private();">_revoke</a></code>,
<code><a href="oauth2client.client.OAuth2Credentials-class.html#_updateFromCredential" onclick="show_private();">_updateFromCredential</a></code>
</p></div>
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.Credentials-class.html">Credentials</a></code></b> (private):
<code><a href="oauth2client.client.Credentials-class.html#_to_json" onclick="show_private();">_to_json</a></code>
</p></div>
<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>
<!-- ==================== CLASS METHODS ==================== -->
<a name="section-ClassMethods"></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">Class Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-ClassMethods"
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><a href="oauth2client.client.OAuth2Credentials-class.html">OAuth2Credentials</a></code></b>:
<code><a href="oauth2client.client.OAuth2Credentials-class.html#from_json">from_json</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="oauth2client.client.Credentials-class.html">Credentials</a></code></b>:
<code><a href="oauth2client.client.Credentials-class.html#new_from_json">new_from_json</a></code>
</p>
</td>
</tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></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">Static Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-StaticMethods"
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.client.GoogleCredentials-class.html#get_application_default" class="summary-sig-name">get_application_default</a>()</span><br />
Get the Application Default Credentials for the current environment.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.get_application_default">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.client.GoogleCredentials-class.html#from_stream" class="summary-sig-name">from_stream</a>(<span class="summary-sig-arg">credential_filename</span>)</span><br />
Create a Credentials object by reading the information from a given file.</td>
<td align="right" valign="top">
<span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.from_stream">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></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">Class Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-ClassVariables"
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><a href="oauth2client.client.Credentials-class.html">Credentials</a></code></b>:
<code><a href="oauth2client.client.Credentials-class.html#NON_SERIALIZED_MEMBERS">NON_SERIALIZED_MEMBERS</a></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">access_token</span>,
<span class="sig-arg">client_id</span>,
<span class="sig-arg">client_secret</span>,
<span class="sig-arg">refresh_token</span>,
<span class="sig-arg">token_expiry</span>,
<span class="sig-arg">token_uri</span>,
<span class="sig-arg">user_agent</span>,
<span class="sig-arg">revoke_uri</span>=<span class="sig-default">GOOGLE_REVOKE_URI</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Create an instance of GoogleCredentials.
This constructor is not usually called by the user, instead
GoogleCredentials objects are instantiated by
GoogleCredentials.from_stream() or
GoogleCredentials.get_application_default().
Args:
access_token: string, access token.
client_id: string, client identifier.
client_secret: string, client secret.
refresh_token: string, refresh token.
token_expiry: datetime, when the access_token expires.
token_uri: string, URI of token endpoint.
user_agent: string, The HTTP User-Agent to provide for this application.
revoke_uri: string, URI for revoke endpoint.
Defaults to GOOGLE_REVOKE_URI; a token can't be revoked if this is None.
</pre>
<dl class="fields">
<dt>Overrides:
object.__init__
</dt>
</dl>
</td></tr></table>
</div>
<a name="create_scoped_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">create_scoped_required</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.create_scoped_required">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Whether this Credentials object is scopeless.
create_scoped(scopes) method needs to be called in order to create
a Credentials object for API calls.
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="create_scoped"></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">create_scoped</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">scopes</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.create_scoped">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Create a Credentials object for the given scopes.
The Credentials type is preserved.
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="serialization_data"></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">serialization_data</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.serialization_data">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Get the fields and their values identifying the current credentials.
</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="get_application_default"></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">get_application_default</span>()</span>
<br /><em class="fname">Static Method</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.get_application_default">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Get the Application Default Credentials for the current environment.
Exceptions:
ApplicationDefaultCredentialsError: raised when the credentials fail
to be retrieved.
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="from_stream"></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">from_stream</span>(<span class="sig-arg">credential_filename</span>)</span>
<br /><em class="fname">Static Method</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="oauth2client.client-pysrc.html#GoogleCredentials.from_stream">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Create a Credentials object by reading the information from a given file.
It returns an object of type GoogleCredentials.
Args:
credential_filename: the path to the file from where the credentials
are to be read
Exceptions:
ApplicationDefaultCredentialsError: raised when the credentials fail
to be retrieved.
</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">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="oauth2client-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- 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 Thu Nov 13 12:43:43 2014
</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>