com.google.api.client.auth.oauth2
Class AccessTokenRequest.AuthorizationCodeGrant
java.lang.Object
java.util.AbstractMap<String,Object>
com.google.api.client.util.GenericData
com.google.api.client.auth.oauth2.AccessTokenRequest
com.google.api.client.auth.oauth2.AccessTokenRequest.AuthorizationCodeGrant
- All Implemented Interfaces:
- Cloneable, Map<String,Object>
- Enclosing class:
- AccessTokenRequest
Deprecated. (scheduled to be removed in 1.5) Use AccessTokenRequest.AuthorizationCodeGrant
@Deprecated
public static class AccessTokenRequest.AuthorizationCodeGrant
- extends AccessTokenRequest
OAuth 2.0 Web Server Flow: request an access token based on a verification code as specified in
Authorization
Code.
Sample usage:
static void requestAccessToken() throws IOException {
try {
AuthorizationCodeGrant request = new AuthorizationCodeGrant(new NetHttpTransport(),
new JacksonFactory(),
"https://server.example.com/authorize",
"s6BhdRkqt3",
"gX1fBat3bV",
"i1WsRn1uB1",
"https://client.example.com/cb");
AccessTokenResponse response = request.execute().parseAs(AccessTokenResponse.class);
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> |
|
Field Summary |
String |
code
Deprecated. (REQUIRED) The authorization code received from the authorization server. |
String |
redirectUri
Deprecated. (REQUIRED) The redirection URI used in the initial request. |
code
public String code
- Deprecated.
- (REQUIRED) The authorization code received from the authorization server.
redirectUri
public String redirectUri
- Deprecated.
- (REQUIRED) The redirection URI used in the initial request.
AccessTokenRequest.AuthorizationCodeGrant
public AccessTokenRequest.AuthorizationCodeGrant()
- Deprecated.
Copyright © 2010-2011 Google. All Rights Reserved.