com.force.sdk.oauth.context.store
Interface SecurityContextStorageService

All Known Implementing Classes:
SecurityContextCookieStore, SecurityContextSessionStore

public interface SecurityContextStorageService

Defines the interface for storing, retrieving, and clearing a SecurityContext to/from a means of storage. Implementors of this interface will represent different methods of of handling the storage of a SecurityContext.

Author:
John Simone

Method Summary
 void clearSecurityContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Clears the security context from storage.
 SecretKeySpec getSecureKey()
          Retrieves the secret key if one is used in this security context store.
 SecurityContext retreiveSecurityContext(javax.servlet.http.HttpServletRequest request)
          Retrieve the security context.
 void storeSecurityContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SecurityContext securityContext)
          Store the security context.
 

Method Detail

storeSecurityContext

void storeSecurityContext(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response,
                          SecurityContext securityContext)
                          throws ContextStoreException
Store the security context. The means of storage will vary by implementation.

Parameters:
request - HttpServletRequest
response - HttpServletResponse
securityContext - SecurityContext
Throws:
ContextStoreException - ContextStoreException

retreiveSecurityContext

SecurityContext retreiveSecurityContext(javax.servlet.http.HttpServletRequest request)
                                        throws ContextStoreException
Retrieve the security context. The means of storage will vary by implementation.

Parameters:
request - HttpServletRequest
Returns:
the stored SecurityContext
Throws:
ContextStoreException - ContextStoreException

clearSecurityContext

void clearSecurityContext(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
Clears the security context from storage. This won't be relevant for all storage types.

Parameters:
request - HttpServletRequest
response - HttpServletResponse

getSecureKey

SecretKeySpec getSecureKey()
                           throws ForceEncryptionException
Retrieves the secret key if one is used in this security context store.

Returns:
SecretKeySpec
Throws:
ForceEncryptionException - ForceEncryptionException


Copyright © 2011. All Rights Reserved.