public class OAuth2Utils extends Object
| Constructor and Description |
|---|
OAuth2Utils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildUrl(String url2,
Map<String,String> queryParams,
Map<String,String> fragmentParams)
Normalizes a URL and parameters.
|
static String |
convertQueryString(Map<String,String> params)
Converts a Map
|
static String |
fetchBearerTokenFromHttpRequest(javax.servlet.http.HttpServletRequest req)
Fetch bearer token from http request
|
static String |
fetchClientSecretFromHttpRequest(String clientId,
javax.servlet.http.HttpServletRequest req)
Fetch client secret from http request for a given client.
|
static boolean |
isUriAllowed(Uri uri,
String[] allowedDomains)
Check if the given Uri is in the allowedDomains array.
|
public static String buildUrl(String url2, Map<String,String> queryParams, Map<String,String> fragmentParams)
url2 - is the base URL to normalizequeryParams - query parameters to add to the URLfragmentParams - fragment params to add to the URLpublic static String convertQueryString(Map<String,String> params)
params - represents the Map of query parameterspublic static String fetchBearerTokenFromHttpRequest(javax.servlet.http.HttpServletRequest req)
req - httpServletRequestpublic static String fetchClientSecretFromHttpRequest(String clientId, javax.servlet.http.HttpServletRequest req)
req - httpServletRequestclientId - id of the clientCopyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.