public class HttpSessionStorage extends Object implements SAMLMessageStorage
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log
Class logger.
|
Constructor and Description |
---|
HttpSessionStorage(HttpServletRequest request)
Creates the storage object.
|
HttpSessionStorage(HttpSession session)
Creates the storage object.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public HttpSessionStorage(HttpServletRequest request)
request
- request to load/store internalMessages frompublic HttpSessionStorage(HttpSession session)
session
- session to load/store internalMessages frompublic void storeMessage(String messageID, org.opensaml.xml.XMLObject message)
storeMessage
in interface SAMLMessageStorage
messageID
- ID of messagemessage
- message to be storedpublic org.opensaml.xml.XMLObject retrieveMessage(String messageID)
Message is stored in String format and must be unmarshalled into XMLObject. Call to this method may thus be expensive.
Messages are automatically cleared upon successful reception, as we presume that there are never multiple ongoing SAML exchanges for the same session. This saves memory used by the session.
retrieveMessage
in interface SAMLMessageStorage
messageID
- ID of message to retrieve