*/
@org.junit.Test
public void testEhCacheReplayedSAML2OneTimeUse() throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
SAML2CallbackHandler callbackHandler = new SAML2CallbackHandler();
callbackHandler.setStatement(SAML2CallbackHandler.Statement.AUTHN);
callbackHandler.setConfirmationMethod(SAML2Constants.CONF_BEARER);
callbackHandler.setIssuer("www.example.com");
callbackHandler.setSignAssertion(false);
ConditionsBean conditions = new ConditionsBean();
conditions.setTokenPeriodMinutes(5);
conditions.setOneTimeUse(true);
callbackHandler.setConditions(conditions);
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
String action = WSHandlerConstants.SAML_TOKEN_UNSIGNED;
Properties properties = new Properties();
properties.put(WSHandlerConstants.SAML_CALLBACK_REF, callbackHandler);