com.google.api.client.googleapis.auth.oauth2.draft10
Class GoogleAccessTokenRequest.GoogleAssertionGrant

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.google.api.client.util.GenericData
          extended by com.google.api.client.auth.oauth2.draft10.AccessTokenRequest
              extended by com.google.api.client.auth.oauth2.draft10.AccessTokenRequest.AssertionGrant
                  extended by com.google.api.client.googleapis.auth.oauth2.draft10.GoogleAccessTokenRequest.GoogleAssertionGrant
All Implemented Interfaces:
Cloneable, Map<String,Object>
Enclosing class:
GoogleAccessTokenRequest

Deprecated. (scheduled to be removed in 1.8) Use TokenRequest

@Deprecated
public static class GoogleAccessTokenRequest.GoogleAssertionGrant
extends AccessTokenRequest.AssertionGrant

Google extension to the OAuth 2.0 Assertion Flow: request an access token based on an assertion.

Sample usage:

 
    static void requestAccessToken() throws IOException {
      try {
        GoogleAssertionGrant request =
            new GoogleAssertionGrant(new NetHttpTransport(), new JacksonFactory(), "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 Class Summary
 
Nested classes/interfaces inherited from class com.google.api.client.auth.oauth2.draft10.AccessTokenRequest
AccessTokenRequest.AssertionGrant, AccessTokenRequest.AuthorizationCodeGrant, AccessTokenRequest.GrantType, AccessTokenRequest.RefreshTokenGrant, AccessTokenRequest.ResourceOwnerPasswordCredentialsGrant
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class com.google.api.client.auth.oauth2.draft10.AccessTokenRequest.AssertionGrant
assertion, assertionType
 
Fields inherited from class com.google.api.client.auth.oauth2.draft10.AccessTokenRequest
authorizationServerUrl, clientId, clientSecret, grantType, jsonFactory, scope, transport, useBasicAuthorization
 
Constructor Summary
GoogleAccessTokenRequest.GoogleAssertionGrant()
          Deprecated.  
GoogleAccessTokenRequest.GoogleAssertionGrant(HttpTransport transport, JsonFactory jsonFactory, String assertionType, String assertion)
          Deprecated.  
 
Method Summary
 
Methods inherited from class com.google.api.client.auth.oauth2.draft10.AccessTokenRequest
execute, executeUnparsed
 
Methods inherited from class com.google.api.client.util.GenericData
clone, entrySet, get, getUnknownKeys, put, putAll, remove, set, setUnknownKeys
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GoogleAccessTokenRequest.GoogleAssertionGrant

public GoogleAccessTokenRequest.GoogleAssertionGrant()
Deprecated. 

GoogleAccessTokenRequest.GoogleAssertionGrant

public GoogleAccessTokenRequest.GoogleAssertionGrant(HttpTransport transport,
                                                     JsonFactory jsonFactory,
                                                     String assertionType,
                                                     String assertion)
Deprecated. 
Parameters:
transport - HTTP transport for executing request in AccessTokenRequest.execute()
jsonFactory - JSON factory to use for parsing response in AccessTokenRequest.execute()
assertionType - format of the assertion as defined by the authorization server. The value MUST be an absolute URI
assertion - assertion


Copyright © 2010-2012 Google. All Rights Reserved.