public class AuthorizationRequestUrl
extends com.google.api.client.http.GenericUrl
Sample usage for a web application:
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
String url = new AuthorizationRequestUrl(
"https://server.example.com/authorize", "s6BhdRkqt3", Arrays.asList("code")).setState("xyz")
.setRedirectUri("https://client.example.com/rd").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 |
|---|
AuthorizationRequestUrl(String authorizationServerEncodedUrl,
String clientId,
Iterable<String> responseTypes) |
| Modifier and Type | Method and Description |
|---|---|
String |
getClientId()
Returns the client identifier.
|
String |
getRedirectUri()
Returns 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. |
String |
getResponseTypes()
Returns the space-separated list of response types, each of which must be
"code",
"token", or a registered extension value (as specified in Response Type). |
String |
getScopes()
Returns the space-separated list of scopes (as specified in Access Token Scope) or
null for none. |
String |
getState()
Returns 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. |
AuthorizationRequestUrl |
setClientId(String clientId)
Sets the client identifier.
|
AuthorizationRequestUrl |
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. |
AuthorizationRequestUrl |
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). |
AuthorizationRequestUrl |
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). |
AuthorizationRequestUrl |
setScopes(Iterable<String> scopes)
Sets the list of scopes (as specified in Access Token Scope) or
null for none. |
AuthorizationRequestUrl |
setScopes(String... scopes)
Sets the list of scopes (as specified in Access Token Scope) or
null for none. |
AuthorizationRequestUrl |
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. |
appendRawPath, 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 AuthorizationRequestUrl(String authorizationServerEncodedUrl, String clientId, Iterable<String> responseTypes)
authorizationServerEncodedUrl - authorization server encoded URLclientId - client identifierresponseTypes - space-separated list of response types, each of which must be
"code", "token", or a registered extension value (as specified in Response
Type)public final String getResponseTypes()
"code",
"token", or a registered extension value (as specified in Response Type).public AuthorizationRequestUrl setResponseTypes(String... responseTypes)
"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.
responseTypes - response types to be joined by a space separator (or a single value
containing multiple space-separated scopes)public AuthorizationRequestUrl setResponseTypes(Iterable<String> responseTypes)
"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.
responseTypes - response types to be joined by a space separator (or a single value
containing multiple space-separated scopes)public final String getRedirectUri()
null for none.public AuthorizationRequestUrl setRedirectUri(String redirectUri)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final String getScopes()
null for none.public AuthorizationRequestUrl setScopes(String... scopes)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
scopes - list of scopes to be joined by a space separator (or a single value containing
multiple space-separated scopes) or null for nonepublic AuthorizationRequestUrl setScopes(Iterable<String> scopes)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
scopes - list of scopes to be joined by a space separator (or a single value containing
multiple space-separated scopes) or null for nonepublic final String getClientId()
public AuthorizationRequestUrl setClientId(String clientId)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final String getState()
null for none.public AuthorizationRequestUrl setState(String state)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Copyright © 2011-2012 Google. All Rights Reserved.