public class CommonUtils extends Object
| Constructor and Description |
|---|
CommonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addToResourceMap(String albumId,
ResourceTokenData resourceTokenData) |
static Optional<javax.servlet.http.Cookie> |
getAppIdCookie(javax.servlet.http.HttpServletRequest request) |
static String |
getAuthHeader() |
static String |
getBearerHeader(javax.servlet.http.HttpServletRequest req) |
static String |
getBearerHeader(String accessToken) |
static ResourceTokenData |
getFromResourceMap(String albumId) |
static String |
getIdpUrl() |
static void |
getToken(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static Optional<TokenData> |
getTokenDataByCookieID(String cookieID) |
static boolean |
logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static String |
readFromResponse(URLConnection urlConnection) |
static org.json.JSONObject |
requestToJson(org.apache.oltu.oauth2.client.request.OAuthClientRequest accessRequest) |
static org.json.JSONObject |
responseToJson(org.apache.oltu.oauth2.client.response.OAuthClientResponse oAuthResponse) |
public static org.json.JSONObject requestToJson(org.apache.oltu.oauth2.client.request.OAuthClientRequest accessRequest)
public static org.json.JSONObject responseToJson(org.apache.oltu.oauth2.client.response.OAuthClientResponse oAuthResponse)
public static boolean logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
public static void getToken(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws org.apache.oltu.oauth2.common.exception.OAuthProblemException,
org.apache.oltu.oauth2.common.exception.OAuthSystemException,
SampleAppServerException
org.apache.oltu.oauth2.common.exception.OAuthProblemExceptionorg.apache.oltu.oauth2.common.exception.OAuthSystemExceptionSampleAppServerExceptionpublic static Optional<javax.servlet.http.Cookie> getAppIdCookie(javax.servlet.http.HttpServletRequest request)
public static String getAuthHeader()
public static String getBearerHeader(javax.servlet.http.HttpServletRequest req)
public static void addToResourceMap(String albumId, ResourceTokenData resourceTokenData)
public static ResourceTokenData getFromResourceMap(String albumId)
public static String getIdpUrl()
public static String readFromResponse(URLConnection urlConnection) throws IOException
IOExceptionCopyright © 2021 WSO2. All rights reserved.