com.google.api.client.auth.oauth2
Class WebServerAuthorizationRequestUrl
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.AbstractAuthorizationRequestUrl
com.google.api.client.auth.oauth2.WebServerAuthorizationRequestUrl
- All Implemented Interfaces:
- Cloneable, Map<String,Object>
public class WebServerAuthorizationRequestUrl
- extends AbstractAuthorizationRequestUrl
OAuth 2.0 Web Server Flow: URL builder for an authorization web page to allow
the end user to authorize the application to access their protected
resources.
The most commonly-set fields are AbstractAuthorizationRequestUrl.clientId, AbstractAuthorizationRequestUrl.redirectUri, and
AbstractAuthorizationRequestUrl.scope. After the end-user grants or denies the request, they will be
redirected to the AbstractAuthorizationRequestUrl.redirectUri with query parameters set by the
authorization server. Use WebServerAuthorizationResponse to parse the
redirect URL.
Sample usage:
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException {
WebServerAuthorizationUrl builder
= new WebServerAuthorizationUrl(BASE_AUTHORIZATION_URL);
builder.clientId = CLIENT_ID;
builder.redirectUri = REDIRECT_URL;
builder.scope = SCOPE;
response.sendRedirect(authorizeUrl.build());
}
- Since:
- 1.0
- 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, getRawPath, hashCode, setRawPath, toPathParts, toString |
WebServerAuthorizationRequestUrl
public WebServerAuthorizationRequestUrl(String encodedAuthorizationServerUrl)
Copyright © 2010 Google. All Rights Reserved.