com.google.api.client.auth.oauth2.draft10
Class AccessTokenRequest.AssertionGrant
java.lang.Object
java.util.AbstractMap<String,Object>
com.google.api.client.util.GenericData
com.google.api.client.auth.oauth2.draft10.AccessTokenRequest
com.google.api.client.auth.oauth2.draft10.AccessTokenRequest.AssertionGrant
- All Implemented Interfaces:
- Cloneable, Map<String,Object>
- Enclosing class:
- AccessTokenRequest
public static class AccessTokenRequest.AssertionGrant
- extends AccessTokenRequest
OAuth 2.0 Assertion Flow: request an access token based on as assertion as specified in Assertion.
Sample usage:
static void requestAccessToken() throws IOException {
try {
AssertionGrant request = new AssertionGrant(new NetHttpTransport(),
new JacksonFactory(),
"https://server.example.com/authorize",
"gX1fBat3bV",
"urn:oasis:names:tc:SAML:2.0:",
"PHNhbWxwOl...[omitted for brevity]...ZT4=");
AccessTokenResponse response = request.execute();
System.out.println("Access token: " + response.accessToken);
} catch (HttpResponseException e) {
AccessTokenErrorResponse response = e.response.parseAs(AccessTokenErrorResponse.class);
System.out.println("Error: " + response.error);
}
}
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
assertionType
public String assertionType
- (REQUIRED) The format of the assertion as defined by the authorization server. The value MUST
be an absolute URI.
assertion
public String assertion
- (REQUIRED) The assertion.
AccessTokenRequest.AssertionGrant
public AccessTokenRequest.AssertionGrant()
AccessTokenRequest.AssertionGrant
public AccessTokenRequest.AssertionGrant(HttpTransport transport,
JsonFactory jsonFactory,
String authorizationServerUrl,
String clientSecret,
String assertionType,
String assertion)
- Parameters:
transport - HTTP transport for executing request in AccessTokenRequest.execute()jsonFactory - JSON factory to use for parsing response in AccessTokenRequest.execute()authorizationServerUrl - encoded authorization server URLclientSecret - client secretassertionType - format of the assertion as defined by the authorization server. The
value MUST be an absolute URIassertion - assertion
Copyright © 2010-2011 Google. All Rights Reserved.