|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.force.sdk.oauth.context.SecurityContextUtil
public final class SecurityContextUtil
This utility class is in place to handle all interaction with the browser cookies that will be used to track a user's authentication status. This will include the logic required to refresh the security context if it isn't available in the server side session.
Field Summary | |
---|---|
static String |
DEFAULT_ROLE
Constant that defines the default role which will be used if no role is available. |
static String |
FORCE_FORCE_ENDPOINT
Constant that defines the name of the endpoint cookie. |
static String |
FORCE_FORCE_SESSION
Constant that defines the name of the session id cookie. |
Method Summary | |
---|---|
static void |
clearCookieValues(javax.servlet.http.HttpServletResponse response)
Clear the endpoint and session cookies. |
static Map<String,String> |
getCookieValues(javax.servlet.http.HttpServletRequest request)
Get the session id and endpoint out of cookies. |
static void |
initializeSecurityContextFromApi(SecurityContext securityContext)
Initializes the user information into the security context via a call to the partner API. |
static void |
setCookieValues(Map<String,String> cookieValueMap,
javax.servlet.http.HttpServletResponse response,
boolean secure)
Set the map of cookie names and values into cookies on the response. |
static void |
setCookieValues(SecurityContext sc,
javax.servlet.http.HttpServletResponse response,
boolean secure)
Set the session id and endpoint from the security context into cookies. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String FORCE_FORCE_SESSION
public static final String FORCE_FORCE_ENDPOINT
public static final String DEFAULT_ROLE
Method Detail |
---|
public static Map<String,String> getCookieValues(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequest
public static void setCookieValues(SecurityContext sc, javax.servlet.http.HttpServletResponse response, boolean secure)
sc
- SecurityContextresponse
- HttpServletResponsesecure
- Whether or not the cookie should be securepublic static void setCookieValues(Map<String,String> cookieValueMap, javax.servlet.http.HttpServletResponse response, boolean secure)
cookieValueMap
- Mapresponse
- HttpServletResponsesecure
- Whether or not the cookie should be securepublic static void clearCookieValues(javax.servlet.http.HttpServletResponse response)
response
- HttpServletResponsepublic static void initializeSecurityContextFromApi(SecurityContext securityContext) throws com.sforce.ws.ConnectionException
securityContext
- securityContext
com.sforce.ws.ConnectionException
- ConnectionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |