public class BrowserClientRequestUrl extends AuthorizationRequestUrl
The default for AuthorizationRequestUrl.getResponseTypes() is "token".
Sample usage for a web application:
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
String url = new BrowserClientRequestUrl(
"https://server.example.com/authorize", "s6BhdRkqt3").setState("xyz")
.setRedirectUri("https://client.example.com/cb").build();
response.sendRedirect(url);
}
Implementation is not thread-safe.
com.google.api.client.util.GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
BrowserClientRequestUrl(String encodedAuthorizationServerUrl,
String clientId) |
| Modifier and Type | Method and Description |
|---|---|
BrowserClientRequestUrl |
setClientId(String clientId)
Sets the client identifier.
|
BrowserClientRequestUrl |
setRedirectUri(String redirectUri)
Sets the URI that the authorization server directs the resource owner's user-agent back to the
client after a successful authorization grant (as specified in Redirection
Endpoint) or
null for none. |
BrowserClientRequestUrl |
setResponseTypes(Iterable<String> responseTypes)
Sets the list of response types, each of which must be
"code", "token", or a
registered extension value (as specified in Response Type). |
BrowserClientRequestUrl |
setResponseTypes(String... responseTypes)
Sets the list of response types, each of which must be
"code", "token", or a
registered extension value (as specified in Response Type). |
BrowserClientRequestUrl |
setScopes(Iterable<String> scopes)
Sets the list of scopes (as specified in Access Token Scope) or
null for none. |
BrowserClientRequestUrl |
setScopes(String... scopes)
Sets the list of scopes (as specified in Access Token Scope) or
null for none. |
BrowserClientRequestUrl |
setState(String state)
Sets the state (an opaque value used by the client to maintain state between the request and
callback, as mentioned in Registration
Requirements) or
null for none. |
getClientId, getRedirectUri, getResponseTypes, getScopes, getStateappendRawPath, build, buildAuthority, buildRelativeUrl, clone, equals, getAll, getFirst, getFragment, getHost, getPathParts, getPort, getRawPath, getScheme, hashCode, setFragment, setHost, setPathParts, setPort, setRawPath, setScheme, toPathParts, toStringentrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, set, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuespublic BrowserClientRequestUrl setResponseTypes(String... responseTypes)
AuthorizationRequestUrl"code", "token", or a
registered extension value (as specified in Response Type).
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setResponseTypes in class AuthorizationRequestUrlresponseTypes - response types to be joined by a space separator (or a single value
containing multiple space-separated scopes)public BrowserClientRequestUrl setResponseTypes(Iterable<String> responseTypes)
AuthorizationRequestUrl"code", "token", or a
registered extension value (as specified in Response Type).
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setResponseTypes in class AuthorizationRequestUrlresponseTypes - response types to be joined by a space separator (or a single value
containing multiple space-separated scopes)public BrowserClientRequestUrl setRedirectUri(String redirectUri)
AuthorizationRequestUrlnull for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setRedirectUri in class AuthorizationRequestUrlpublic BrowserClientRequestUrl setScopes(String... scopes)
AuthorizationRequestUrlnull for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setScopes in class AuthorizationRequestUrlscopes - list of scopes to be joined by a space separator (or a single value containing
multiple space-separated scopes) or null for nonepublic BrowserClientRequestUrl setScopes(Iterable<String> scopes)
AuthorizationRequestUrlnull for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setScopes in class AuthorizationRequestUrlscopes - list of scopes to be joined by a space separator (or a single value containing
multiple space-separated scopes) or null for nonepublic BrowserClientRequestUrl setClientId(String clientId)
AuthorizationRequestUrlOverriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setClientId in class AuthorizationRequestUrlpublic BrowserClientRequestUrl setState(String state)
AuthorizationRequestUrlnull for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setState in class AuthorizationRequestUrlCopyright © 2011-2012 Google. All Rights Reserved.