|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.force.sdk.oauth.context.store.SecurityContextCookieStore
public class SecurityContextCookieStore
Handles the storage of a SecurityContext via browser cookies.
| Field Summary | |
|---|---|
static String |
SECURITY_CONTEXT_COOKIE_NAME
Constant that stores the name of the security context cookie. |
| Constructor Summary | |
|---|---|
SecurityContextCookieStore()
|
|
| Method Summary | |
|---|---|
static byte[] |
b64decode(String s)
Decodes a base-64 encoded string and returns a byte array. |
static String |
b64encode(byte[] b)
Returns a base-64 encoded byte array. |
void |
clearSecurityContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Clears the security context cookies from the browser. |
SecretKeySpec |
getSecureKey()
Retrieves the secret key if one is used in this security context store. |
boolean |
isContextStored(javax.servlet.http.HttpServletRequest request)
Detects whether or not there is a security context stored via this storage method. |
SecurityContext |
retreiveSecurityContext(javax.servlet.http.HttpServletRequest request)
Retrieves the security context from a browser cookie. |
void |
setCookiePath(String cookiePath)
Sets the path for the cookie to use |
void |
setKey(String key)
Sets the key directly |
void |
setKeyFileName(String fileName)
Sets the key file name and reads the key from the file. |
void |
storeSecurityContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SecurityContext securityContext)
Saves the security context to a browser cookie. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SECURITY_CONTEXT_COOKIE_NAME
| Constructor Detail |
|---|
public SecurityContextCookieStore()
| Method Detail |
|---|
public void storeSecurityContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SecurityContext securityContext)
throws ContextStoreException
storeSecurityContext in interface SecurityContextStorageServicerequest - HttpServletRequestresponse - HttpServletResponsesecurityContext - SecurityContext
ContextStoreException - ContextStoreException
public SecurityContext retreiveSecurityContext(javax.servlet.http.HttpServletRequest request)
throws ContextStoreException
retreiveSecurityContext in interface SecurityContextStorageServicerequest - HttpServletRequest
ContextStoreException - ContextStoreException
public SecretKeySpec getSecureKey()
throws ForceEncryptionException
SecurityContextStorageService
getSecureKey in interface SecurityContextStorageServiceForceEncryptionException - ForceEncryptionException
public void setKeyFileName(String fileName)
throws ForceEncryptionException
fileName - String
ForceEncryptionException - ForceEncryptionException
public void setKey(String key)
throws ForceEncryptionException
fileName - String
ForceEncryptionException - ForceEncryptionExceptionpublic static String b64encode(byte[] b)
b - - byte array
public static byte[] b64decode(String s)
s - - the encoded string
public void clearSecurityContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
clearSecurityContext in interface SecurityContextStorageServicerequest - HttpServletRequestresponse - HttpServletResponsepublic boolean isContextStored(javax.servlet.http.HttpServletRequest request)
isContextStored in interface SecurityContextStorageServicerequest - HttpServletRequest
public void setCookiePath(String cookiePath)
cookiePath -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||