com.google.api.client.auth.oauth2
Class AccessTokenRequest.AssertionGrant

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.AccessTokenRequest
              extended by com.google.api.client.auth.oauth2.AccessTokenRequest.AssertionGrant
All Implemented Interfaces:
Cloneable, Map<String,Object>
Enclosing class:
AccessTokenRequest

Deprecated. (scheduled to be removed in 1.5) Use AccessTokenRequest.AssertionGrant

@Deprecated
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().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 Class Summary
 
Nested classes/interfaces inherited from class com.google.api.client.auth.oauth2.AccessTokenRequest
AccessTokenRequest.AssertionGrant, AccessTokenRequest.AuthorizationCodeGrant, 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
 String assertion
          Deprecated. (REQUIRED) The assertion.
 String assertionType
          Deprecated. (REQUIRED) The format of the assertion as defined by the authorization server.
 
Fields inherited from class com.google.api.client.auth.oauth2.AccessTokenRequest
authorizationServerUrl, clientId, clientSecret, grantType, jsonFactory, scope, transport, useBasicAuthorization
 
Fields inherited from class com.google.api.client.util.GenericData
unknownFields
 
Constructor Summary
AccessTokenRequest.AssertionGrant()
          Deprecated.  
 
Method Summary
 
Methods inherited from class com.google.api.client.auth.oauth2.AccessTokenRequest
execute
 
Methods inherited from class com.google.api.client.util.GenericData
clone, entrySet, get, put, putAll, remove, set
 
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
 

Field Detail

assertionType

public String assertionType
Deprecated. 
(REQUIRED) The format of the assertion as defined by the authorization server. The value MUST be an absolute URI.


assertion

public String assertion
Deprecated. 
(REQUIRED) The assertion.

Constructor Detail

AccessTokenRequest.AssertionGrant

public AccessTokenRequest.AssertionGrant()
Deprecated. 


Copyright © 2010-2011 Google. All Rights Reserved.