|
||||||||||
| 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)
decode a base 64 encoded string back to the original byte array. |
static String |
b64encode(byte[] b)
base 64 encode the passed in 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. |
SecurityContext |
retreiveSecurityContext(javax.servlet.http.HttpServletRequest request)
retrieves the security context from a browser cookie. |
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 - 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 - HttpServletResponse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||