Class MessageReplaySecurityHandlerTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.testing.XMLObjectBaseTestCase
-
- org.opensaml.saml.common.binding.security.impl.MessageReplaySecurityHandlerTest
-
public class MessageReplaySecurityHandlerTest extends XMLObjectBaseTestCase
Testing SAML message replay security policy rule.
-
-
Field Summary
Fields Modifier and Type Field Description private MessageReplaySecurityHandlerhandlerprivate MessageContextmessageContextprivate StringmessageIDprivate ReplayCachereplayCacheprivate MemoryStorageServicestorageService-
Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description MessageReplaySecurityHandlerTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidsetUp()protected voidtearDown()voidtestNoReplay()Test valid message ID.voidtestNoReplayDistinctIDs()Test valid message ID, distinct ID.voidtestReplay()Test invalid replay of message ID.voidtestReplayValidWithExpiration()Test valid replay of message ID due to replay cache expiration.-
Methods inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElement
-
Methods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
-
-
-
Field Detail
-
messageContext
private MessageContext messageContext
-
handler
private MessageReplaySecurityHandler handler
-
messageID
private String messageID
-
storageService
private MemoryStorageService storageService
-
replayCache
private ReplayCache replayCache
-
-
Method Detail
-
tearDown
@AfterMethod protected void tearDown()
-
testNoReplay
public void testNoReplay() throws MessageHandlerExceptionTest valid message ID.- Throws:
MessageHandlerException- ...
-
testNoReplayDistinctIDs
public void testNoReplayDistinctIDs() throws MessageHandlerExceptionTest valid message ID, distinct ID.- Throws:
MessageHandlerException- ...
-
testReplay
public void testReplay() throws MessageHandlerExceptionTest invalid replay of message ID.- Throws:
MessageHandlerException- ...
-
testReplayValidWithExpiration
public void testReplayValidWithExpiration() throws InterruptedException, MessageHandlerException, ComponentInitializationExceptionTest valid replay of message ID due to replay cache expiration.- Throws:
InterruptedException- ...MessageHandlerException- ...ComponentInitializationException- ...
-
-