com.google.api.client.googleapis.auth.oauth2.draft10
Class GoogleAuthorizationRequestUrl
java.lang.Object
java.util.AbstractMap<String,Object>
com.google.api.client.util.GenericData
com.google.api.client.http.GenericUrl
com.google.api.client.auth.oauth2.draft10.AuthorizationRequestUrl
com.google.api.client.googleapis.auth.oauth2.draft10.GoogleAuthorizationRequestUrl
- All Implemented Interfaces:
- Cloneable, Map<String,Object>
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 classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
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 |
AUTHORIZATION_SERVER_URL
public static final String AUTHORIZATION_SERVER_URL
- Authorization server URL for end-user authorization.
- See Also:
- Constant Field Values
GoogleAuthorizationRequestUrl
public GoogleAuthorizationRequestUrl()
GoogleAuthorizationRequestUrl
public GoogleAuthorizationRequestUrl(String clientId,
String redirectUri,
String scope)
- Parameters:
clientId
- client identifierredirectUri
- Absolute URI to which the authorization server will redirect the user-agent
to when the end-user authorization step is completedscope
- 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.
Copyright © 2010-2011 Google. All Rights Reserved.