Spring Security SAML

org.springframework.security.saml.storage
Class HttpSessionStorage

java.lang.Object
  extended by org.springframework.security.saml.storage.HttpSessionStorage
All Implemented Interfaces:
SAMLMessageStorage

public class HttpSessionStorage
extends Object
implements SAMLMessageStorage

Class implements storage of SAML messages and uses HttpSession as underlying dataStore. As the XMLObjects can't be serialized and failover could thus be prevented, the messages are transformed into SAMLObject which internally marshalls the content into XML during serialization.

Author:
Vladimir Schäfer

Constructor Summary
HttpSessionStorage(HttpServletRequest request)
          Creates the storage object and initializes it to load SAML messages from Session found in the request object.
HttpSessionStorage(HttpSession session)
           
 
Method Summary
 Set<String> getAllMessages()
           
 org.opensaml.xml.XMLObject retrieveMessage(String messageID)
          Returns previously stored message with the given ID or null, if there is no message stored.
 void storeMessage(String messageId, org.opensaml.xml.XMLObject message)
          Stores a request message into the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpSessionStorage

public HttpSessionStorage(HttpServletRequest request)
Creates the storage object and initializes it to load SAML messages from Session found in the request object.

Parameters:
request - request to load/store messages from

HttpSessionStorage

public HttpSessionStorage(HttpSession session)
Method Detail

storeMessage

public void storeMessage(String messageId,
                         org.opensaml.xml.XMLObject message)
Stores a request message into the repository. RequestAbstractType must have an ID set. Any previous message with the same ID will be overwritten.

Specified by:
storeMessage in interface SAMLMessageStorage
Parameters:
messageId - ID of message
message - message to be stored

retrieveMessage

public org.opensaml.xml.XMLObject retrieveMessage(String messageID)
Returns previously stored message with the given ID or null, if there is no message stored.

Message is stored in String format and must be unmarshalled into XMLObject. Call to this method may thus be expensive.

Specified by:
retrieveMessage in interface SAMLMessageStorage
Parameters:
messageID - ID of message to retrieve
Returns:
message found or null

getAllMessages

public Set<String> getAllMessages()

Spring Security SAML