com.google.api.client.googleapis.auth.oauth2.draft10
Class GoogleAuthorizationRequestUrl

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.google.api.client.util.GenericData
          extended by com.google.api.client.http.GenericUrl
              extended by com.google.api.client.auth.oauth2.draft10.AuthorizationRequestUrl
                  extended by com.google.api.client.googleapis.auth.oauth2.draft10.GoogleAuthorizationRequestUrl
All Implemented Interfaces:
Cloneable, Map<String,Object>

Deprecated. (scheduled to be removed in 1.9) Use GoogleAuthorizationCodeRequestUrl or GoogleBrowserClientRequestUrl or AuthorizationRequestUrl

@Deprecated
public class GoogleAuthorizationRequestUrl
extends AuthorizationRequestUrl

Google extension to the OAuth 2.0 (draft 10) URL builder for an authorization web page to allow the end user to authorize the application to access their protected resources.

Use AuthorizationResponse to parse the redirect response after the end user grants/denies the request.

Sample usage for a web application:

 
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
    GoogleAuthorizationRequestUrl builder =
        new GoogleAuthorizationRequestUrl(CLIENT_ID, REDIRECT_URL, SCOPE);
    response.sendRedirect(builder.build());
    return;
  }
 
 

Since:
1.4
Author:
Yaniv Inbar

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.api.client.auth.oauth2.draft10.AuthorizationRequestUrl
AuthorizationRequestUrl.ResponseType
 
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
static String AUTHORIZATION_SERVER_URL
          Deprecated. Authorization server URL for end-user authorization.
 
Fields inherited from class com.google.api.client.auth.oauth2.draft10.AuthorizationRequestUrl
clientId, redirectUri, responseType, scope, state
 
Constructor Summary
GoogleAuthorizationRequestUrl()
          Deprecated.  
GoogleAuthorizationRequestUrl(String clientId, String redirectUri, String scope)
          Deprecated.  
 
Method Summary
 String getAccessType()
          Deprecated. [OPTIONAL] "offline" to request offline access from the user or "online" to request online access ("online" is the default if null).
 String getApprovalPrompt()
          Deprecated. [OPTIONAL] "force" to force the approval UI to show or "auto" to request auto-approval when possible ("auto" is the default if null).
 GoogleAuthorizationRequestUrl setAccessType(String accessType)
          Deprecated. [OPTIONAL] "offline" to request offline access from the user or "online" to request online access ("online" is the default if null).
 GoogleAuthorizationRequestUrl setApprovalPrompt(String approvalPrompt)
          Deprecated. [OPTIONAL] "force" to force the approval UI to show or "auto" to request auto-approval when possible ("auto" is the default if null).
 
Methods inherited from class com.google.api.client.http.GenericUrl
appendRawPath, build, clone, equals, getAll, getFirst, getFragment, getHost, getPathParts, getPort, getRawPath, getScheme, hashCode, setFragment, setHost, setPathParts, setPort, setRawPath, setScheme, toPathParts, toString
 
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, getUnknownKeys, put, putAll, remove, set, setUnknownKeys
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTHORIZATION_SERVER_URL

public static final String AUTHORIZATION_SERVER_URL
Deprecated. 
Authorization server URL for end-user authorization.

See Also:
Constant Field Values
Constructor Detail

GoogleAuthorizationRequestUrl

public GoogleAuthorizationRequestUrl()
Deprecated. 

GoogleAuthorizationRequestUrl

public GoogleAuthorizationRequestUrl(String clientId,
                                     String redirectUri,
                                     String scope)
Deprecated. 
Parameters:
clientId - client identifier
redirectUri - Absolute URI to which the authorization server will redirect the user-agent to when the end-user authorization step is completed
scope - scope of the access request expressed as a list of space-delimited strings. If the value contains multiple space-delimited strings, their order does not matter, and each string adds an additional access range to the requested scope.
Method Detail

getApprovalPrompt

public final String getApprovalPrompt()
Deprecated. 
[OPTIONAL] "force" to force the approval UI to show or "auto" to request auto-approval when possible ("auto" is the default if null).

Since:
1.6

setApprovalPrompt

public GoogleAuthorizationRequestUrl setApprovalPrompt(String approvalPrompt)
Deprecated. 
[OPTIONAL] "force" to force the approval UI to show or "auto" to request auto-approval when possible ("auto" is the default if null).

Subclasses may override the return value by calling super.

Since:
1.6

getAccessType

public final String getAccessType()
Deprecated. 
[OPTIONAL] "offline" to request offline access from the user or "online" to request online access ("online" is the default if null).

Since:
1.6

setAccessType

public GoogleAuthorizationRequestUrl setAccessType(String accessType)
Deprecated. 
[OPTIONAL] "offline" to request offline access from the user or "online" to request online access ("online" is the default if null).

Subclasses may override the return value by calling super.

Since:
1.6


Copyright © 2010-2012 Google. All Rights Reserved.