blob: 3bf78acc45b06c6c6d292fdc95ed2d4b4882328e [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="sts_v1.html">Security Token Service API</a> . <a href="sts_v1.v1.html">v1</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#token">token(body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Exchanges a credential for a Google OAuth 2.0 access token.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="token">token(body=None, x__xgafv=None)</code>
<pre>Exchanges a credential for a Google OAuth 2.0 access token.
Args:
body: object, The request body.
The object takes the form of:
{ # Request message for ExchangeToken.
&quot;grantType&quot;: &quot;A String&quot;, # Required. The grant type. Must be `urn:ietf:params:oauth:grant-type:token-exchange`, which indicates a token exchange.
&quot;requestedTokenType&quot;: &quot;A String&quot;, # Required. An identifier for the type of requested security token. Must be `urn:ietf:params:oauth:token-type:access_token`.
&quot;subjectToken&quot;: &quot;A String&quot;, # Required. The input token. You can use a Google-issued OAuth 2.0 access token with this field to obtain an access token with new security attributes applied, such as a Credential Access Boundary. If an access token already contains security attributes, you cannot apply additional security attributes.
&quot;subjectTokenType&quot;: &quot;A String&quot;, # Required. An identifier that indicates the type of the security token in the `subject_token` parameter. Must be `urn:ietf:params:oauth:token-type:access_token`.
&quot;options&quot;: &quot;A String&quot;, # A set of features that Security Token Service supports, in addition to the standard OAuth 2.0 token exchange, formatted as a serialized JSON object of Options.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for ExchangeToken.
&quot;expires_in&quot;: 42, # The amount of time, in seconds, between the time when the `access_token` was issued and the time when the `access_token` will expire. This field is absent when the `subject_token` in the request is a Google-issued, short-lived access token. In this case, the `access_token` has the same expiration time as the `subject_token`.
&quot;issued_token_type&quot;: &quot;A String&quot;, # The token type. Always matches the value of `requested_token_type` from the request.
&quot;access_token&quot;: &quot;A String&quot;, # An OAuth 2.0 security token, issued by Google, in response to the token exchange request.
&quot;token_type&quot;: &quot;A String&quot;, # The type of `access_token`. Always has the value `Bearer`.
}</pre>
</div>
</body></html>