Author: anil.saldhana(a)jboss.com
Date: 2012-01-31 16:38:41 -0500 (Tue, 31 Jan 2012)
New Revision: 1352
Modified:
product/trunk/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/workflow/
product/trunk/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/workflow/SAML2RedirectSignatureTomcatWorkflowUnitTestCase.java
Log:
merge in r1325
Property changes on:
product/trunk/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/workflow
___________________________________________________________________
Modified: svn:mergeinfo
-
/federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/workflow:1140-1173,1307-1318,1321-1324
/federation/trunk/picketlink-fed-api/src/test/java/org/picketlink/test/identity/federation/bindings/workflow:1192-1228
/federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/bindings/workflow:1152-1154,1159-1173,1192-1228
+
/federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/workflow:1140-1173,1307-1318,1321-1325
/federation/trunk/picketlink-fed-api/src/test/java/org/picketlink/test/identity/federation/bindings/workflow:1192-1228
/federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/bindings/workflow:1152-1154,1159-1173,1192-1228
Modified:
product/trunk/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/workflow/SAML2RedirectSignatureTomcatWorkflowUnitTestCase.java
===================================================================
---
product/trunk/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/workflow/SAML2RedirectSignatureTomcatWorkflowUnitTestCase.java 2012-01-31
21:33:56 UTC (rev 1351)
+++
product/trunk/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/workflow/SAML2RedirectSignatureTomcatWorkflowUnitTestCase.java 2012-01-31
21:38:41 UTC (rev 1352)
@@ -140,6 +140,56 @@
sendSPRequest(request, true, idpAddress);
}
+ private MockCatalinaResponse sendIDPRequest(MockCatalinaRequest request, boolean
validatingAliasToTokenIssuer)
+ throws LifecycleException, IOException, ServletException
+ {
+ MockCatalinaContextClassLoader mclIDP = setupTCL(IDP_PROFILE);
+ Thread.currentThread().setContextClassLoader(mclIDP);
+
+ IDPWebBrowserSSOValve idp = new IDPWebBrowserSSOValve();
+
+ idp.setSignOutgoingMessages(true);
+ idp.setIgnoreIncomingSignatures(false);
+ idp.setValidatingAliasToTokenIssuer(validatingAliasToTokenIssuer);
+
+ idp.setContainer(request.getContext());
+ idp.start();
+
+ MockCatalinaResponse response = new MockCatalinaResponse();
+
+ idp.invoke(request, response);
+
+ return response;
+ }
+
+ private MockCatalinaResponse sendSPRequest(MockCatalinaRequest request, boolean
validateAuthentication, String idpAddress)
+ throws LifecycleException, IOException
+ {
+ MockCatalinaContextClassLoader mclSPEmp = setupTCL(SP_PROFILE);
+ Thread.currentThread().setContextClassLoader(mclSPEmp);
+
+ SPRedirectSignatureFormAuthenticator sp = new
SPRedirectSignatureFormAuthenticator();
+
+ sp.setIdpAddress(idpAddress);
+
+ request.setParameter(GeneralConstants.RELAY_STATE, null);
+
+ MockCatalinaLoginConfig loginConfig = new MockCatalinaLoginConfig();
+
+ sp.setContainer(request.getContext());
+ sp.testStart();
+
+ MockCatalinaResponse response = new MockCatalinaResponse();
+
+ if (validateAuthentication) {
+ Assert.assertTrue("Employee app succesfully authenticated.",
sp.authenticate(request, response, loginConfig));
+ } else {
+ sp.authenticate(request, response, loginConfig);
+ }
+
+ return response;
+ }
+
private MockCatalinaRequest createRequest(String userAddress)
{
MockCatalinaRequest request = new MockCatalinaRequest();
@@ -195,56 +245,6 @@
}
});
}
-
- private MockCatalinaResponse sendIDPRequest(MockCatalinaRequest request, boolean
validatingAliasToTokenIssuer)
- throws LifecycleException, IOException, ServletException
- {
- MockCatalinaContextClassLoader mclIDP = setupTCL(IDP_PROFILE);
- Thread.currentThread().setContextClassLoader(mclIDP);
-
- IDPWebBrowserSSOValve idp = new IDPWebBrowserSSOValve();
-
- idp.setSignOutgoingMessages(true);
- idp.setIgnoreIncomingSignatures(false);
- idp.setValidatingAliasToTokenIssuer(validatingAliasToTokenIssuer);
-
- idp.setContainer(request.getContext());
- idp.start();
-
- MockCatalinaResponse response = new MockCatalinaResponse();
-
- idp.invoke(request, response);
-
- return response;
- }
-
- private MockCatalinaResponse sendSPRequest(MockCatalinaRequest request, boolean
validateAuthentication, String idpAddress)
- throws LifecycleException, IOException
- {
- MockCatalinaContextClassLoader mclSPEmp = setupTCL(SP_PROFILE);
- Thread.currentThread().setContextClassLoader(mclSPEmp);
-
- SPRedirectSignatureFormAuthenticator sp = new
SPRedirectSignatureFormAuthenticator();
-
- sp.setIdpAddress(idpAddress);
-
- request.setParameter(GeneralConstants.RELAY_STATE, null);
-
- MockCatalinaLoginConfig loginConfig = new MockCatalinaLoginConfig();
-
- sp.setContainer(request.getContext());
- sp.testStart();
-
- MockCatalinaResponse response = new MockCatalinaResponse();
-
- if (validateAuthentication) {
- Assert.assertTrue("Employee app succesfully authenticated.",
sp.authenticate(request, response, loginConfig));
- } else {
- sp.authenticate(request, response, loginConfig);
- }
-
- return response;
- }
private MockCatalinaContextClassLoader setupTCL(String resource)
{
Show replies by date