cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [04/18] cxf-fediz git commit: Whitespace cleanup
Date Mon, 13 Feb 2017 11:36:20 GMT
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/federation/samlsso/src/test/java/org/apache/cxf/fediz/integrationtests/SAMLSSOTest.java
----------------------------------------------------------------------
diff --git a/systests/federation/samlsso/src/test/java/org/apache/cxf/fediz/integrationtests/SAMLSSOTest.java b/systests/federation/samlsso/src/test/java/org/apache/cxf/fediz/integrationtests/SAMLSSOTest.java
index a3d9dff..a34b2fc 100644
--- a/systests/federation/samlsso/src/test/java/org/apache/cxf/fediz/integrationtests/SAMLSSOTest.java
+++ b/systests/federation/samlsso/src/test/java/org/apache/cxf/fediz/integrationtests/SAMLSSOTest.java
@@ -48,15 +48,15 @@ import org.junit.Assert;
 import org.junit.BeforeClass;
 
 /**
- * This is a test for federation using a SAML SSO enabled web application (using CXF interceptors). The web 
- * application is configured to use a different realm to that of the IdP. The IdP then redirects to a third party 
+ * This is a test for federation using a SAML SSO enabled web application (using CXF interceptors). The web
+ * application is configured to use a different realm to that of the IdP. The IdP then redirects to a third party
  * IdP for authentication. The third party IdPs that are tested are as follows:
  *  - WS-Federation (Fediz)
  *  - SAML SSO (Fediz)
  *  - OIDC (custom webapp)
  */
 public class SAMLSSOTest {
-    
+
     private enum ServerType {
         IDP, REALMB, OIDC, RP
     }
@@ -66,12 +66,12 @@ public class SAMLSSOTest {
     static String idpSamlSSOHttpsPort;
     static String idpOIDCHttpsPort;
     static String rpHttpsPort;
-    
+
     private static Tomcat idpServer;
     private static Tomcat idpRealmbServer;
     private static Tomcat idpOIDCServer;
     private static Tomcat rpServer;
-    
+
     @BeforeClass
     public static void init() throws Exception {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -81,8 +81,8 @@ public class SAMLSSOTest {
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.webflow", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.security.web", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info");
-        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info");  
-        
+        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info");
+
         idpHttpsPort = System.getProperty("idp.https.port");
         Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort);
         idpRealmbHttpsPort = System.getProperty("idp.realmb.https.port");
@@ -99,8 +99,8 @@ public class SAMLSSOTest {
         idpOIDCServer = startServer(ServerType.OIDC, idpOIDCHttpsPort);
         rpServer = startServer(ServerType.RP, rpHttpsPort);
     }
-    
-    private static Tomcat startServer(ServerType serverType, String port) 
+
+    private static Tomcat startServer(ServerType serverType, String port)
         throws ServletException, LifecycleException, IOException {
         Tomcat server = new Tomcat();
         server.setPort(0);
@@ -139,13 +139,13 @@ public class SAMLSSOTest {
         if (serverType == ServerType.IDP) {
             File stsWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp-sts");
             server.addWebapp("/fediz-idp-sts", stsWebapp.getAbsolutePath());
-    
+
             File idpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp");
             server.addWebapp("/fediz-idp", idpWebapp.getAbsolutePath());
         } else if (serverType == ServerType.REALMB) {
             File stsWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp-sts-realmb");
             server.addWebapp("/fediz-idp-sts-realmb", stsWebapp.getAbsolutePath());
-    
+
             File idpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp-realmb");
             server.addWebapp("/fediz-idp-realmb", idpWebapp.getAbsolutePath());
         } else if (serverType == ServerType.OIDC) {
@@ -160,7 +160,7 @@ public class SAMLSSOTest {
 
         return server;
     }
-    
+
     @AfterClass
     public static void cleanup() {
         shutdownServer(idpServer);
@@ -168,7 +168,7 @@ public class SAMLSSOTest {
         shutdownServer(idpOIDCServer);
         shutdownServer(rpServer);
     }
-    
+
     private static void shutdownServer(Tomcat server) {
         try {
             if (server != null && server.getServer() != null
@@ -186,7 +186,7 @@ public class SAMLSSOTest {
     public String getIdpHttpsPort() {
         return idpHttpsPort;
     }
-    
+
     public String getIdpRealmbHttpsPort() {
         return idpRealmbHttpsPort;
     }
@@ -194,27 +194,27 @@ public class SAMLSSOTest {
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     public String getServletContextName() {
         return "fedizhelloworld";
     }
-    
+
     @org.junit.Test
     public void testWSFederation() throws Exception {
         String url = "https://localhost:" + getRpHttpsPort() + "/samlsso/app1/services/25";
         //System.out.println(url);
         //Thread.sleep(60 * 2 * 1000);
-        
+
         String user = "ALICE";  // realm b credentials
         String password = "ECILA";
-        
-        final String bodyTextContent = 
+
+        final String bodyTextContent =
             login(url, user, password, getIdpRealmbHttpsPort(), getIdpHttpsPort());
-        
+
         Assert.assertTrue(bodyTextContent.contains("This is the double number response"));
-        
+
     }
-    
+
     @org.junit.Test
     public void testSAMLSSOFedizIdP() throws Exception {
         String url = "https://localhost:" + getRpHttpsPort() + "/samlsso/app2/services/25";
@@ -222,27 +222,27 @@ public class SAMLSSOTest {
         // Thread.sleep(60 * 2 * 1000);
         String user = "ALICE";  // realm b credentials
         String password = "ECILA";
-        
-        final String bodyTextContent = 
+
+        final String bodyTextContent =
             login(url, user, password, getIdpRealmbHttpsPort(), getIdpHttpsPort(), true);
-        
+
         Assert.assertTrue(bodyTextContent.contains("This is the double number response"));
     }
-    
+
     @org.junit.Test
     public void testOIDC() throws Exception {
         String url = "https://localhost:" + getRpHttpsPort() + "/samlsso/app3/services/25";
         String user = "ALICE";  // realm b credentials
         String password = "ECILA";
-        
-        final String bodyTextContent = 
+
+        final String bodyTextContent =
             loginOIDC(url, user, password, idpOIDCHttpsPort, idpHttpsPort);
-        
+
         Assert.assertTrue(bodyTextContent.contains("This is the double number response"));
     }
-    
 
-    private static String login(String url, String user, String password, 
+
+    private static String login(String url, String user, String password,
                                 String idpPort, String rpIdpPort) throws IOException {
         //
         // Access the RP + get redirected to the IdP for "realm a". Then get redirected to the IdP for
@@ -258,7 +258,7 @@ public class SAMLSSOTest {
 
         webClient.getOptions().setJavaScriptEnabled(false);
         HtmlPage idpPage = webClient.getPage(url);
-        
+
         Assert.assertEquals("IDP SignIn Response Form", idpPage.getTitleText());
 
         // Now redirect back to the IdP for Realm A
@@ -267,7 +267,7 @@ public class SAMLSSOTest {
         HtmlSubmitInput button = form.getInputByName("_eventId_submit");
 
         HtmlPage idpPageRealmA = button.click();
-        
+
         Assert.assertTrue("SAML IDP Response Form".equals(idpPage.getTitleText())
                           || "IDP SignIn Response Form".equals(idpPage.getTitleText()));
         form = idpPageRealmA.getFormByName("samlsigninresponseform");
@@ -276,12 +276,12 @@ public class SAMLSSOTest {
         button = form.getInputByName("_eventId_submit");
 
         XmlPage rpPage = button.click();
-        
+
         webClient.close();
         return rpPage.asXml();
     }
-    
-    private static String login(String url, String user, String password, 
+
+    private static String login(String url, String user, String password,
                                 String idpPort, String rpIdpPort, boolean postBinding) throws IOException {
         //
         // Access the RP + get redirected to the IdP for "realm a". Then get redirected to the IdP for
@@ -297,7 +297,7 @@ public class SAMLSSOTest {
 
         webClient.getOptions().setJavaScriptEnabled(false);
         HtmlPage idpPage = webClient.getPage(url);
-        
+
         if (postBinding) {
             Assert.assertTrue("SAML IDP Response Form".equals(idpPage.getTitleText())
                                 || "IDP SignIn Response Form".equals(idpPage.getTitleText()));
@@ -309,7 +309,7 @@ public class SAMLSSOTest {
                 }
             }
         }
-        
+
         Assert.assertEquals("IDP SignIn Response Form", idpPage.getTitleText());
 
         // Now redirect back to the RP
@@ -322,8 +322,8 @@ public class SAMLSSOTest {
         webClient.close();
         return rpPage.asXml();
     }
-    
-    private static String loginOIDC(String url, String user, String password, 
+
+    private static String loginOIDC(String url, String user, String password,
                                     String idpPort, String rpIdpPort) throws IOException {
         //
         // Access the RP + get redirected to the IdP for "realm a". Then get redirected to the IdP for

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/federation/wsfed/src/test/java/org/apache/cxf/fediz/integrationtests/WSFedTest.java
----------------------------------------------------------------------
diff --git a/systests/federation/wsfed/src/test/java/org/apache/cxf/fediz/integrationtests/WSFedTest.java b/systests/federation/wsfed/src/test/java/org/apache/cxf/fediz/integrationtests/WSFedTest.java
index 8821ecb..ad5a097 100644
--- a/systests/federation/wsfed/src/test/java/org/apache/cxf/fediz/integrationtests/WSFedTest.java
+++ b/systests/federation/wsfed/src/test/java/org/apache/cxf/fediz/integrationtests/WSFedTest.java
@@ -54,7 +54,7 @@ import org.junit.BeforeClass;
 
 /**
  * This is a test for federation using a WS-Federation enabled web application. The web application is configured
- * to use a different realm to that of the IdP. The IdP then redirects to a third party IdP for authentication. 
+ * to use a different realm to that of the IdP. The IdP then redirects to a third party IdP for authentication.
  * The third party IdPs that are tested are as follows:
  *  - WS-Federation (Fediz)
  *  - SAML SSO (Fediz)
@@ -62,7 +62,7 @@ import org.junit.BeforeClass;
  *  - OIDC (custom webapp)
  */
 public class WSFedTest {
-    
+
     private enum ServerType {
         IDP, REALMB, SAMLSSO, OIDC, RP
     }
@@ -72,13 +72,13 @@ public class WSFedTest {
     static String idpSamlSSOHttpsPort;
     static String idpOIDCHttpsPort;
     static String rpHttpsPort;
-    
+
     private static Tomcat idpServer;
     private static Tomcat idpRealmbServer;
     private static Tomcat idpSamlSSOServer;
     private static Tomcat idpOIDCServer;
     private static Tomcat rpServer;
-    
+
     @BeforeClass
     public static void init() throws Exception {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -88,8 +88,8 @@ public class WSFedTest {
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.webflow", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.security.web", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info");
-        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info");  
-        
+        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info");
+
         idpHttpsPort = System.getProperty("idp.https.port");
         Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort);
         idpRealmbHttpsPort = System.getProperty("idp.realmb.https.port");
@@ -107,8 +107,8 @@ public class WSFedTest {
         idpOIDCServer = startServer(ServerType.OIDC, idpOIDCHttpsPort);
         rpServer = startServer(ServerType.RP, rpHttpsPort);
     }
-    
-    private static Tomcat startServer(ServerType serverType, String port) 
+
+    private static Tomcat startServer(ServerType serverType, String port)
         throws ServletException, LifecycleException, IOException {
         Tomcat server = new Tomcat();
         server.setPort(0);
@@ -149,13 +149,13 @@ public class WSFedTest {
         if (serverType == ServerType.IDP) {
             File stsWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp-sts");
             server.addWebapp("/fediz-idp-sts", stsWebapp.getAbsolutePath());
-    
+
             File idpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp");
             server.addWebapp("/fediz-idp", idpWebapp.getAbsolutePath());
         } else if (serverType == ServerType.REALMB) {
             File stsWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp-sts-realmb");
             server.addWebapp("/fediz-idp-sts-realmb", stsWebapp.getAbsolutePath());
-    
+
             File idpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp-realmb");
             server.addWebapp("/fediz-idp-realmb", idpWebapp.getAbsolutePath());
         } else if (serverType == ServerType.SAMLSSO) {
@@ -167,24 +167,24 @@ public class WSFedTest {
         } else {
             File rpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "simpleWebapp");
             Context cxt = server.addWebapp("/wsfed", rpWebapp.getAbsolutePath());
-            
+
             FederationAuthenticator fa = new FederationAuthenticator();
             fa.setConfigFile(currentDir + File.separator + "target" + File.separator
                              + "test-classes" + File.separator + "fediz_config_wsfed.xml");
             cxt.getPipeline().addValve(fa);
-            
+
             rpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "simpleWebapp");
             cxt = server.addWebapp("/samlsso", rpWebapp.getAbsolutePath());
             cxt.getPipeline().addValve(fa);
-            
+
             rpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "simpleWebapp");
             cxt = server.addWebapp("/samlssocustom", rpWebapp.getAbsolutePath());
             cxt.getPipeline().addValve(fa);
-            
+
             rpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "simpleWebapp");
             cxt = server.addWebapp("/samlssocustompost", rpWebapp.getAbsolutePath());
             cxt.getPipeline().addValve(fa);
-            
+
             rpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "simpleWebapp");
             cxt = server.addWebapp("/oidc", rpWebapp.getAbsolutePath());
             cxt.getPipeline().addValve(fa);
@@ -194,7 +194,7 @@ public class WSFedTest {
 
         return server;
     }
-    
+
     @AfterClass
     public static void cleanup() {
         shutdownServer(idpServer);
@@ -203,7 +203,7 @@ public class WSFedTest {
         shutdownServer(idpOIDCServer);
         shutdownServer(rpServer);
     }
-    
+
     private static void shutdownServer(Tomcat server) {
         try {
             if (server != null && server.getServer() != null
@@ -221,7 +221,7 @@ public class WSFedTest {
     public String getIdpHttpsPort() {
         return idpHttpsPort;
     }
-    
+
     public String getIdpRealmbHttpsPort() {
         return idpRealmbHttpsPort;
     }
@@ -229,11 +229,11 @@ public class WSFedTest {
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     public String getServletContextName() {
         return "fedizhelloworld";
     }
-    
+
     @org.junit.Test
     public void testWSFederation() throws Exception {
         String url = "https://localhost:" + getRpHttpsPort() + "/wsfed/secure/fedservlet";
@@ -241,10 +241,10 @@ public class WSFedTest {
         // Thread.sleep(60 * 2 * 1000);
         String user = "ALICE";  // realm b credentials
         String password = "ECILA";
-        
-        final String bodyTextContent = 
+
+        final String bodyTextContent =
             login(url, user, password, getIdpRealmbHttpsPort(), idpHttpsPort);
-        
+
         Assert.assertTrue("Principal not alice",
                           bodyTextContent.contains("userPrincipal=alice"));
         Assert.assertTrue("User " + user + " does not have role Admin",
@@ -264,7 +264,7 @@ public class WSFedTest {
         Assert.assertTrue("User " + user + " claim " + claim + " is not 'alice@realma.org'",
                           bodyTextContent.contains(claim + "=alice@realma.org"));
     }
-    
+
     @org.junit.Test
     public void testSAMLSSOFedizIdP() throws Exception {
         String url = "https://localhost:" + getRpHttpsPort() + "/samlsso/secure/fedservlet";
@@ -272,10 +272,10 @@ public class WSFedTest {
         // Thread.sleep(60 * 2 * 1000);
         String user = "ALICE";  // realm b credentials
         String password = "ECILA";
-        
-        final String bodyTextContent = 
+
+        final String bodyTextContent =
             login(url, user, password, getIdpRealmbHttpsPort(), getIdpHttpsPort(), true);
-        
+
         Assert.assertTrue("Principal not alice",
                           bodyTextContent.contains("userPrincipal=alice"));
         Assert.assertTrue("User " + user + " does not have role Admin",
@@ -295,7 +295,7 @@ public class WSFedTest {
         Assert.assertTrue("User " + user + " claim " + claim + " is not 'alice@realma.org'",
                           bodyTextContent.contains(claim + "=alice@realma.org"));
     }
-    
+
     @org.junit.Test
     public void testSAMLSSOCustom() throws Exception {
         String url = "https://localhost:" + getRpHttpsPort() + "/samlssocustom/secure/fedservlet";
@@ -303,10 +303,10 @@ public class WSFedTest {
         // Thread.sleep(60 * 2 * 1000);
         String user = "ALICE";  // realm b credentials
         String password = "ECILA";
-        
-        final String bodyTextContent = 
+
+        final String bodyTextContent =
             login(url, user, password, idpSamlSSOHttpsPort, idpHttpsPort, false);
-        
+
         Assert.assertTrue("Principal not alice",
                           bodyTextContent.contains("userPrincipal=alice"));
         Assert.assertTrue("User " + user + " does not have role Admin",
@@ -326,7 +326,7 @@ public class WSFedTest {
         Assert.assertTrue("User " + user + " claim " + claim + " is not 'alice@realma.org'",
                           bodyTextContent.contains(claim + "=alice@realma.org"));
     }
-    
+
     @org.junit.Test
     public void testSAMLSSOCustomPostBinding() throws Exception {
         String url = "https://localhost:" + getRpHttpsPort() + "/samlssocustompost/secure/fedservlet";
@@ -334,10 +334,10 @@ public class WSFedTest {
         // Thread.sleep(60 * 2 * 1000);
         String user = "ALICE";  // realm b credentials
         String password = "ECILA";
-        
-        final String bodyTextContent = 
+
+        final String bodyTextContent =
             login(url, user, password, idpSamlSSOHttpsPort, idpHttpsPort, true);
-        
+
         Assert.assertTrue("Principal not alice",
                           bodyTextContent.contains("userPrincipal=alice"));
         Assert.assertTrue("User " + user + " does not have role Admin",
@@ -357,16 +357,16 @@ public class WSFedTest {
         Assert.assertTrue("User " + user + " claim " + claim + " is not 'alice@realma.org'",
                           bodyTextContent.contains(claim + "=alice@realma.org"));
     }
-    
+
     @org.junit.Test
     public void testOIDC() throws Exception {
         String url = "https://localhost:" + getRpHttpsPort() + "/oidc/secure/fedservlet";
         String user = "ALICE";  // realm b credentials
         String password = "ECILA";
-        
-        final String bodyTextContent = 
+
+        final String bodyTextContent =
             loginOIDC(url, user, password, idpOIDCHttpsPort, idpHttpsPort);
-        
+
         Assert.assertTrue("Principal not alice",
                           bodyTextContent.contains("userPrincipal=alice"));
         Assert.assertTrue("User " + user + " does not have role Admin",
@@ -386,8 +386,8 @@ public class WSFedTest {
         Assert.assertTrue("User " + user + " claim " + claim + " is not 'alice@realma.org'",
                           bodyTextContent.contains(claim + "=alice@realma.org"));
     }
-    
-    private static String login(String url, String user, String password, 
+
+    private static String login(String url, String user, String password,
                                            String idpPort, String rpIdpPort) throws IOException {
         //
         // Access the RP + get redirected to the IdP for "realm a". Then get redirected to the IdP for
@@ -405,7 +405,7 @@ public class WSFedTest {
         final HtmlPage idpPage = webClient.getPage(url);
         webClient.getOptions().setJavaScriptEnabled(true);
         Assert.assertEquals("IDP SignIn Response Form", idpPage.getTitleText());
-        
+
         // For some reason, redirecting back to the IdP for "realm a" is not working with htmlunit. So extract
         // the parameters manually from the form, and access the IdP for "realm a" with them
         DomNodeList<DomElement> results = idpPage.getElementsByTagName("input");
@@ -430,21 +430,21 @@ public class WSFedTest {
         final WebClient webClient2 = new WebClient();
         webClient2.setCookieManager(cookieManager);
         webClient2.getOptions().setUseInsecureSSL(true);
-        
+
         String url2 = "https://localhost:" + rpIdpPort + "/fediz-idp/federation?";
         url2 += "wctx=" + wctx + "&";
         url2 += "wa=" + wa + "&";
         url2 += "wtrealm=" + URLEncoder.encode(wtrealm, "UTF8") + "&";
         url2 += "wresult=" + URLEncoder.encode(wresult, "UTF8") + "&";
-        
+
         webClient2.getOptions().setJavaScriptEnabled(false);
         final HtmlPage idpPage2 = webClient2.getPage(url2);
         webClient2.getOptions().setJavaScriptEnabled(true);
         Assert.assertEquals("IDP SignIn Response Form", idpPage2.getTitleText());
-        
+
         // Now redirect back to the RP
         final HtmlForm form2 = idpPage2.getFormByName("signinresponseform");
-        
+
         final HtmlSubmitInput button2 = form2.getInputByName("_eventId_submit");
 
         final HtmlPage rpPage = button2.click();
@@ -453,8 +453,8 @@ public class WSFedTest {
         webClient2.close();
         return rpPage.getBody().getTextContent();
     }
-    
-    private static String login(String url, String user, String password, 
+
+    private static String login(String url, String user, String password,
                                 String idpPort, String rpIdpPort, boolean postBinding) throws IOException {
         //
         // Access the RP + get redirected to the IdP for "realm a". Then get redirected to the IdP for
@@ -470,7 +470,7 @@ public class WSFedTest {
 
         webClient.getOptions().setJavaScriptEnabled(false);
         HtmlPage idpPage = webClient.getPage(url);
-        
+
         if (postBinding) {
             Assert.assertTrue("SAML IDP Response Form".equals(idpPage.getTitleText())
                                 || "IDP SignIn Response Form".equals(idpPage.getTitleText()));
@@ -482,7 +482,7 @@ public class WSFedTest {
                 }
             }
         }
-        
+
         Assert.assertEquals("IDP SignIn Response Form", idpPage.getTitleText());
 
         // Now redirect back to the RP
@@ -496,8 +496,8 @@ public class WSFedTest {
         webClient.close();
         return rpPage.getBody().getTextContent();
     }
-    
-    private static String loginOIDC(String url, String user, String password, 
+
+    private static String loginOIDC(String url, String user, String password,
                                 String idpPort, String rpIdpPort) throws IOException {
         //
         // Access the RP + get redirected to the IdP for "realm a". Then get redirected to the IdP for
@@ -512,11 +512,11 @@ public class WSFedTest {
             new UsernamePasswordCredentials(user, password));
 
         webClient.getOptions().setJavaScriptEnabled(false);
-        
+
         // The decision page is returned as XML for some reason. So parse it and send a form response back.
         HtmlPage oidcIdpConfirmationPage = webClient.getPage(url);
         final HtmlForm oidcForm = oidcIdpConfirmationPage.getForms().get(0);
-        
+
         WebRequest request = new WebRequest(new URL(oidcForm.getActionAttribute()), HttpMethod.POST);
 
         request.setRequestParameters(new ArrayList<NameValuePair>());
@@ -533,7 +533,7 @@ public class WSFedTest {
         request.getRequestParameters().add(new NameValuePair("oauthDecision", "allow"));
 
         HtmlPage idpPage = webClient.getPage(request);
-        
+
         Assert.assertEquals("IDP SignIn Response Form", idpPage.getTitleText());
 
         // Now redirect back to the RP

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/idp/src/test/java/org/apache/cxf/fediz/systests/idp/IdpTest.java
----------------------------------------------------------------------
diff --git a/systests/idp/src/test/java/org/apache/cxf/fediz/systests/idp/IdpTest.java b/systests/idp/src/test/java/org/apache/cxf/fediz/systests/idp/IdpTest.java
index 5330c4f..3a90ab5 100644
--- a/systests/idp/src/test/java/org/apache/cxf/fediz/systests/idp/IdpTest.java
+++ b/systests/idp/src/test/java/org/apache/cxf/fediz/systests/idp/IdpTest.java
@@ -89,7 +89,7 @@ public class IdpTest {
         WSSConfig.init();
     }
 
-    private static Tomcat startServer(boolean idp, String port) 
+    private static Tomcat startServer(boolean idp, String port)
         throws ServletException, LifecycleException, IOException {
         Tomcat server = new Tomcat();
         server.setPort(0);
@@ -132,7 +132,7 @@ public class IdpTest {
     public static void cleanup() {
         shutdownServer(idpServer);
     }
-    
+
     private static void shutdownServer(Tomcat server) {
         try {
             if (server != null && server.getServer() != null
@@ -197,7 +197,7 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     @org.junit.Test
     public void testSuccessfulSSOInvokeOnIdP() throws Exception {
         String url = "https://localhost:" + getIdpHttpsPort() + "/fediz-idp/federation?";
@@ -213,7 +213,7 @@ public class IdpTest {
         final WebClient webClient = new WebClient();
         webClient.getOptions().setUseInsecureSSL(true);
         webClient.addRequestHeader("Authorization", "Basic " + Base64.encode((user + ":" + password).getBytes()));
-        
+
         //
         // First invocation
         //
@@ -235,14 +235,14 @@ public class IdpTest {
         }
 
         Assert.assertNotNull(wresult);
-        
+
         //
         // Second invocation - change the credentials to make sure the session is set up correctly
-        // 
+        //
 
         webClient.removeRequestHeader("Authorization");
         webClient.addRequestHeader("Authorization", "Basic " + Base64.encode(("mallory" + ":" + password).getBytes()));
-        
+
         webClient.getOptions().setJavaScriptEnabled(false);
         idpPage = webClient.getPage(url);
         webClient.getOptions().setJavaScriptEnabled(true);
@@ -260,7 +260,7 @@ public class IdpTest {
         }
 
         Assert.assertNotNull(wresult);
-        
+
         webClient.close();
     }
 
@@ -441,7 +441,7 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     // Send an unknown wa value
     @org.junit.Test
     public void testBadWa() throws Exception {
@@ -471,7 +471,7 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     // Send an unknown whr value
     @org.junit.Test
     public void testBadWHR() throws Exception {
@@ -501,7 +501,7 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     // Send an unknown wtrealm value
     @org.junit.Test
     public void testBadWtRealm() throws Exception {
@@ -531,7 +531,7 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     // Send an malformed wreply value
     @org.junit.Test
     public void testMalformedWReply() throws Exception {
@@ -561,7 +561,7 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     // Send a bad wreply value
     @org.junit.Test
     public void testBadWReply() throws Exception {
@@ -569,7 +569,7 @@ public class IdpTest {
         url += "wa=wsignin1.0";
         url += "&whr=urn:org:apache:cxf:fediz:idp:realm-A";
         url += "&wtrealm=urn:org:apache:cxf:fediz:fedizhelloworld";
-        String wreply = "https://www.apache.org:" + getRpHttpsPort() + "/" 
+        String wreply = "https://www.apache.org:" + getRpHttpsPort() + "/"
             + getServletContextName() + "/secure/fedservlet";
         url += "&wreply=" + wreply;
 
@@ -592,7 +592,7 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     @org.junit.Test
     public void testValidWReplyWrongApplication() throws Exception {
         String url = "https://localhost:" + getIdpHttpsPort() + "/fediz-idp/federation?";
@@ -621,7 +621,7 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     @org.junit.Test
     public void testWReplyExactMatchingSuccess() throws Exception {
         String url = "https://localhost:" + getIdpHttpsPort() + "/fediz-idp/federation?";
@@ -645,14 +645,14 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     @org.junit.Test
     public void testWReplyExactMatchingFailure() throws Exception {
         String url = "https://localhost:" + getIdpHttpsPort() + "/fediz-idp/federation?";
         url += "wa=wsignin1.0";
         url += "&whr=urn:org:apache:cxf:fediz:idp:realm-A";
         url += "&wtrealm=urn:org:apache:cxf:fediz:fedizhelloworld3";
-        String wreply = "https://localhost:" + getRpHttpsPort() + "/" + getServletContextName() 
+        String wreply = "https://localhost:" + getRpHttpsPort() + "/" + getServletContextName()
             + "/secure/fedservlet/blah";
         url += "&wreply=" + wreply;
 
@@ -675,7 +675,7 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     @org.junit.Test
     public void testNoEndpointAddressOrConstraint() throws Exception {
         String url = "https://localhost:" + getIdpHttpsPort() + "/fediz-idp/federation?";
@@ -705,8 +705,8 @@ public class IdpTest {
 
         webClient.close();
     }
-    
-    // Send a bad wreply value. This will pass the reg ex validation but fail the commons-validator 
+
+    // Send a bad wreply value. This will pass the reg ex validation but fail the commons-validator
     // validation
     @org.junit.Test
     public void testWReplyWithDoubleSlashes() throws Exception {
@@ -714,7 +714,7 @@ public class IdpTest {
         url += "wa=wsignin1.0";
         url += "&whr=urn:org:apache:cxf:fediz:idp:realm-A";
         url += "&wtrealm=urn:org:apache:cxf:fediz:fedizhelloworld";
-        String wreply = "https://localhost:" + getRpHttpsPort() + "/" + getServletContextName() 
+        String wreply = "https://localhost:" + getRpHttpsPort() + "/" + getServletContextName()
             + "/secure//fedservlet";
         url += "&wreply=" + wreply;
 
@@ -737,8 +737,8 @@ public class IdpTest {
 
         webClient.close();
     }
-  
-    
+
+
     @Test
     public void testIdPLogout() throws Exception {
 
@@ -752,7 +752,7 @@ public class IdpTest {
 
         String user = "alice";
         String password = "ecila";
-        
+
         CookieManager cookieManager = new CookieManager();
 
         WebClient webClient = new WebClient();
@@ -797,7 +797,7 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     @Test
     public void testIdPLogoutCleanup() throws Exception {
 
@@ -811,7 +811,7 @@ public class IdpTest {
 
         String user = "alice";
         String password = "ecila";
-        
+
         CookieManager cookieManager = new CookieManager();
 
         WebClient webClient = new WebClient();
@@ -852,7 +852,7 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
     @Test
     public void testIdPLogoutCleanupWithBadWReply() throws Exception {
 
@@ -866,7 +866,7 @@ public class IdpTest {
 
         String user = "alice";
         String password = "ecila";
-        
+
         CookieManager cookieManager = new CookieManager();
 
         WebClient webClient = new WebClient();
@@ -883,7 +883,7 @@ public class IdpTest {
         webClient.close();
 
         // 2. now we logout from IdP using a bad wreply
-        String badWReply = "https://localhost:" + getRpHttpsPort() + "/" + getServletContextName() 
+        String badWReply = "https://localhost:" + getRpHttpsPort() + "/" + getServletContextName()
             + "/secure//fedservlet";
         String idpLogoutUrl = "https://localhost:" + getIdpHttpsPort() + "/fediz-idp/federation?wa="
             + FederationConstants.ACTION_SIGNOUT_CLEANUP;
@@ -914,5 +914,5 @@ public class IdpTest {
 
         webClient.close();
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificatePreAuthSpringTest.java
----------------------------------------------------------------------
diff --git a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificatePreAuthSpringTest.java b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificatePreAuthSpringTest.java
index 6d47264..d5e6aa0 100644
--- a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificatePreAuthSpringTest.java
+++ b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificatePreAuthSpringTest.java
@@ -34,9 +34,9 @@ public class ClientCertificatePreAuthSpringTest extends AbstractClientCertTests
 
     static String idpHttpsPort;
     static String rpHttpsPort;
-    
+
     private static Server rpServer;
-    
+
     @BeforeClass
     public static void init() {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -53,24 +53,24 @@ public class ClientCertificatePreAuthSpringTest extends AbstractClientCertTests
         Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort);
         rpHttpsPort = System.getProperty("rp.https.port");
         Assert.assertNotNull("Property 'rp.https.port' null", rpHttpsPort);
-        
+
         JettyUtils.initIdpServer();
         JettyUtils.startIdpServer();
-        
+
         try {
             Resource testServerConfig = Resource.newSystemResource("rp-client-cert-server.xml");
             XmlConfiguration configuration = new XmlConfiguration(testServerConfig.getInputStream());
-            rpServer = (Server)configuration.configure();   
+            rpServer = (Server)configuration.configure();
             rpServer.start();
         } catch (Exception e) {
             e.printStackTrace();
         }
     }
-    
+
     @AfterClass
     public static void cleanup() {
         JettyUtils.stopIdpServer();
-        
+
         if (rpServer != null && rpServer.isStarted()) {
             try {
                 rpServer.stop();
@@ -89,10 +89,10 @@ public class ClientCertificatePreAuthSpringTest extends AbstractClientCertTests
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     @Override
     public String getServletContextName() {
         return "fedizspringhelloworld";
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificateTest.java
----------------------------------------------------------------------
diff --git a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificateTest.java b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificateTest.java
index 2955b52..0211c7c 100644
--- a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificateTest.java
+++ b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificateTest.java
@@ -34,9 +34,9 @@ public class ClientCertificateTest extends AbstractClientCertTests {
 
     static String idpHttpsPort;
     static String rpHttpsPort;
-    
+
     private static Server rpServer;
-    
+
     @BeforeClass
     public static void init() {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -56,21 +56,21 @@ public class ClientCertificateTest extends AbstractClientCertTests {
 
         JettyUtils.initIdpServer();
         JettyUtils.startIdpServer();
-        
+
         try {
             Resource testServerConfig = Resource.newSystemResource("rp-client-cert-server.xml");
             XmlConfiguration configuration = new XmlConfiguration(testServerConfig.getInputStream());
-            rpServer = (Server)configuration.configure();   
+            rpServer = (Server)configuration.configure();
             rpServer.start();
         } catch (Exception e) {
             e.printStackTrace();
         }
     }
-    
+
     @AfterClass
     public static void cleanup() {
         JettyUtils.stopIdpServer();
-        
+
         if (rpServer != null && rpServer.isStarted()) {
             try {
                 rpServer.stop();
@@ -89,10 +89,10 @@ public class ClientCertificateTest extends AbstractClientCertTests {
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     @Override
     public String getServletContextName() {
         return "fedizhelloworld";
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/HOKCallbackHandler.java
----------------------------------------------------------------------
diff --git a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/HOKCallbackHandler.java b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/HOKCallbackHandler.java
index e2f402c..a323696 100644
--- a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/HOKCallbackHandler.java
+++ b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/HOKCallbackHandler.java
@@ -29,11 +29,11 @@ import org.apache.cxf.fediz.core.spi.WReqCallback;
 
 public class HOKCallbackHandler implements CallbackHandler {
 
-    static final String HOK_WREQ = 
+    static final String HOK_WREQ =
         "<RequestSecurityToken xmlns=\"http://docs.oasis-open.org/ws-sx/ws-trust/200512\">"
         + "<KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey</KeyType>"
         + "</RequestSecurityToken>";
-    
+
     public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
         for (int i = 0; i < callbacks.length; i++) {
             if (callbacks[i] instanceof WReqCallback) {

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyPreAuthSpringTest.java
----------------------------------------------------------------------
diff --git a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyPreAuthSpringTest.java b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyPreAuthSpringTest.java
index 0d79b36..961dceb 100644
--- a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyPreAuthSpringTest.java
+++ b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyPreAuthSpringTest.java
@@ -31,7 +31,7 @@ public class JettyPreAuthSpringTest extends AbstractTests {
 
     static String idpHttpsPort;
     static String rpHttpsPort;
-    
+
     @BeforeClass
     public static void init() {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -40,7 +40,7 @@ public class JettyPreAuthSpringTest extends AbstractTests {
         System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.webflow", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.security.web", "info");
-        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info"); 
+        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info");
 
         idpHttpsPort = System.getProperty("idp.https.port");
         Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort);
@@ -52,7 +52,7 @@ public class JettyPreAuthSpringTest extends AbstractTests {
         JettyUtils.initRpServer();
         JettyUtils.startRpServer();
     }
-    
+
     @AfterClass
     public static void cleanup() {
         JettyUtils.stopIdpServer();
@@ -68,16 +68,16 @@ public class JettyPreAuthSpringTest extends AbstractTests {
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     @Override
     public String getServletContextName() {
         return "fedizspringhelloworld";
     }
-    
+
     @Ignore("This tests is currently failing on Jetty")
     @Override
     public void testConcurrentRequests() throws Exception {
         // super.testConcurrentRequests();
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyTest.java
----------------------------------------------------------------------
diff --git a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyTest.java b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyTest.java
index 1b3b291..5fe32ba 100644
--- a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyTest.java
+++ b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyTest.java
@@ -29,7 +29,7 @@ public class JettyTest extends AbstractTests {
 
     static String idpHttpsPort;
     static String rpHttpsPort;
-    
+
     @BeforeClass
     public static void init() {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -52,7 +52,7 @@ public class JettyTest extends AbstractTests {
         JettyUtils.initRpServer();
         JettyUtils.startRpServer();
     }
-    
+
     @AfterClass
     public static void cleanup() {
         JettyUtils.stopIdpServer();
@@ -68,12 +68,12 @@ public class JettyTest extends AbstractTests {
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     @Override
     public String getServletContextName() {
         return "fedizhelloworld";
     }
-    
+
     @Ignore("This tests is currently failing on Jetty")
     @Override
     public void testConcurrentRequests() throws Exception {

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyUtils.java
----------------------------------------------------------------------
diff --git a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyUtils.java b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyUtils.java
index 8696870..f4cb9fe 100644
--- a/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyUtils.java
+++ b/systests/jetty8/src/test/java/org/apache/cxf/fediz/integrationtests/JettyUtils.java
@@ -27,34 +27,34 @@ public final class JettyUtils {
 
     private static Server idpServer;
     private static Server rpServer;
-    
+
     private JettyUtils() {
     }
-        
+
     public static void initIdpServer() {
         if (idpServer == null) {
             try {
                 Resource testServerConfig = Resource.newSystemResource("idp-server.xml");
                 XmlConfiguration configuration = new XmlConfiguration(testServerConfig.getInputStream());
-                idpServer = (Server)configuration.configure();   
-                
+                idpServer = (Server)configuration.configure();
+
             } catch (Exception e) {
                 e.printStackTrace();
             }
         }
     }
-    
+
     public static void startIdpServer() {
         if (idpServer != null && !idpServer.isStarted()) {
             try {
                 idpServer.start();
-                
+
             } catch (Exception e) {
                 e.printStackTrace();
             }
         }
     }
-    
+
     public static void stopIdpServer() {
         if (idpServer != null && idpServer.isStarted()) {
             try {
@@ -64,24 +64,24 @@ public final class JettyUtils {
             }
         }
     }
-    
+
     public static void initRpServer() {
         initRpServer("rp-server.xml");
     }
-    
+
     public static void initRpServer(String configurationFile) {
         if (rpServer == null) {
             try {
                 Resource testServerConfig = Resource.newSystemResource(configurationFile);
                 XmlConfiguration configuration = new XmlConfiguration(testServerConfig.getInputStream());
-                rpServer = (Server)configuration.configure();   
-                
+                rpServer = (Server)configuration.configure();
+
             } catch (Exception e) {
                 e.printStackTrace();
             }
         }
     }
-    
+
     public static void startRpServer() {
         if (rpServer != null && !rpServer.isStarted()) {
             try {
@@ -91,7 +91,7 @@ public final class JettyUtils {
             }
         }
     }
-    
+
     public static void stopRpServer() {
         if (rpServer != null && rpServer.isStarted()) {
             try {
@@ -101,5 +101,5 @@ public final class JettyUtils {
             }
         }
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificatePreAuthSpringTest.java
----------------------------------------------------------------------
diff --git a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificatePreAuthSpringTest.java b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificatePreAuthSpringTest.java
index a1db4fe..8454775 100644
--- a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificatePreAuthSpringTest.java
+++ b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificatePreAuthSpringTest.java
@@ -39,10 +39,10 @@ public class ClientCertificatePreAuthSpringTest extends AbstractClientCertTests
 
     static String idpHttpsPort;
     static String rpHttpsPort;
-    
+
     private static Server rpServer;
     private static Tomcat idpServer;
-    
+
     @BeforeClass
     public static void init() {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -59,19 +59,19 @@ public class ClientCertificatePreAuthSpringTest extends AbstractClientCertTests
         Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort);
         rpHttpsPort = System.getProperty("rp.https.port");
         Assert.assertNotNull("Property 'rp.https.port' null", rpHttpsPort);
-        
+
         initIdp();
-        
+
         try {
             Resource testServerConfig = Resource.newSystemResource("rp-client-cert-server.xml");
             XmlConfiguration configuration = new XmlConfiguration(testServerConfig.getInputStream());
-            rpServer = (Server)configuration.configure();   
+            rpServer = (Server)configuration.configure();
             rpServer.start();
         } catch (Exception e) {
             e.printStackTrace();
         }
     }
-    
+
     @AfterClass
     public static void cleanup() {
         try {
@@ -85,7 +85,7 @@ public class ClientCertificatePreAuthSpringTest extends AbstractClientCertTests
         } catch (Exception e) {
             e.printStackTrace();
         }
-        
+
         if (rpServer != null && rpServer.isStarted()) {
             try {
                 rpServer.stop();
@@ -94,7 +94,7 @@ public class ClientCertificatePreAuthSpringTest extends AbstractClientCertTests
             }
         }
     }
-    
+
     private static void initIdp() {
         try {
             idpServer = new Tomcat();
@@ -102,11 +102,11 @@ public class ClientCertificatePreAuthSpringTest extends AbstractClientCertTests
             String currentDir = new File(".").getCanonicalPath();
             String baseDir = currentDir + File.separator + "target";
             idpServer.setBaseDir(baseDir);
-            
+
             idpServer.getHost().setAppBase("tomcat/idp/webapps");
             idpServer.getHost().setAutoDeploy(true);
             idpServer.getHost().setDeployOnStartup(true);
-            
+
             Connector httpsConnector = new Connector();
             httpsConnector.setPort(Integer.parseInt(idpHttpsPort));
             httpsConnector.setSecure(true);
@@ -122,13 +122,13 @@ public class ClientCertificatePreAuthSpringTest extends AbstractClientCertTests
             httpsConnector.setAttribute("SSLEnabled", true);
 
             idpServer.getService().addConnector(httpsConnector);
-            
+
             File stsWebapp = new File(baseDir + File.separator + idpServer.getHost().getAppBase(), "fediz-idp-sts");
             idpServer.addWebapp("/fediz-idp-sts", stsWebapp.getAbsolutePath());
-    
+
             File idpWebapp = new File(baseDir + File.separator + idpServer.getHost().getAppBase(), "fediz-idp");
             idpServer.addWebapp("/fediz-idp", idpWebapp.getAbsolutePath());
-            
+
             idpServer.start();
         } catch (Exception e) {
             e.printStackTrace();
@@ -145,10 +145,10 @@ public class ClientCertificatePreAuthSpringTest extends AbstractClientCertTests
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     @Override
     public String getServletContextName() {
         return "fedizspringhelloworld";
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificateTest.java
----------------------------------------------------------------------
diff --git a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificateTest.java b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificateTest.java
index b53c3ee..d4f66b1 100644
--- a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificateTest.java
+++ b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/ClientCertificateTest.java
@@ -39,10 +39,10 @@ public class ClientCertificateTest extends AbstractClientCertTests {
 
     static String idpHttpsPort;
     static String rpHttpsPort;
-    
+
     private static Server rpServer;
     private static Tomcat idpServer;
-    
+
     @BeforeClass
     public static void init() {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -61,17 +61,17 @@ public class ClientCertificateTest extends AbstractClientCertTests {
         Assert.assertNotNull("Property 'rp.https.port' null", rpHttpsPort);
 
         initIdp();
-        
+
         try {
             Resource testServerConfig = Resource.newSystemResource("rp-client-cert-server.xml");
             XmlConfiguration configuration = new XmlConfiguration(testServerConfig.getInputStream());
-            rpServer = (Server)configuration.configure();   
+            rpServer = (Server)configuration.configure();
             rpServer.start();
         } catch (Exception e) {
             e.printStackTrace();
         }
     }
-    
+
     @AfterClass
     public static void cleanup() {
         try {
@@ -85,7 +85,7 @@ public class ClientCertificateTest extends AbstractClientCertTests {
         } catch (Exception e) {
             e.printStackTrace();
         }
-        
+
         if (rpServer != null && rpServer.isStarted()) {
             try {
                 rpServer.stop();
@@ -94,7 +94,7 @@ public class ClientCertificateTest extends AbstractClientCertTests {
             }
         }
     }
-    
+
     private static void initIdp() {
         try {
             idpServer = new Tomcat();
@@ -102,11 +102,11 @@ public class ClientCertificateTest extends AbstractClientCertTests {
             String currentDir = new File(".").getCanonicalPath();
             String baseDir = currentDir + File.separator + "target";
             idpServer.setBaseDir(baseDir);
-            
+
             idpServer.getHost().setAppBase("tomcat/idp/webapps");
             idpServer.getHost().setAutoDeploy(true);
             idpServer.getHost().setDeployOnStartup(true);
-            
+
             Connector httpsConnector = new Connector();
             httpsConnector.setPort(Integer.parseInt(idpHttpsPort));
             httpsConnector.setSecure(true);
@@ -122,13 +122,13 @@ public class ClientCertificateTest extends AbstractClientCertTests {
             httpsConnector.setAttribute("SSLEnabled", true);
 
             idpServer.getService().addConnector(httpsConnector);
-            
+
             File stsWebapp = new File(baseDir + File.separator + idpServer.getHost().getAppBase(), "fediz-idp-sts");
             idpServer.addWebapp("/fediz-idp-sts", stsWebapp.getAbsolutePath());
-    
+
             File idpWebapp = new File(baseDir + File.separator + idpServer.getHost().getAppBase(), "fediz-idp");
             idpServer.addWebapp("/fediz-idp", idpWebapp.getAbsolutePath());
-            
+
             idpServer.start();
         } catch (Exception e) {
             e.printStackTrace();
@@ -145,10 +145,10 @@ public class ClientCertificateTest extends AbstractClientCertTests {
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     @Override
     public String getServletContextName() {
         return "fedizhelloworld";
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/HOKCallbackHandler.java
----------------------------------------------------------------------
diff --git a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/HOKCallbackHandler.java b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/HOKCallbackHandler.java
index e2f402c..a323696 100644
--- a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/HOKCallbackHandler.java
+++ b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/HOKCallbackHandler.java
@@ -29,11 +29,11 @@ import org.apache.cxf.fediz.core.spi.WReqCallback;
 
 public class HOKCallbackHandler implements CallbackHandler {
 
-    static final String HOK_WREQ = 
+    static final String HOK_WREQ =
         "<RequestSecurityToken xmlns=\"http://docs.oasis-open.org/ws-sx/ws-trust/200512\">"
         + "<KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey</KeyType>"
         + "</RequestSecurityToken>";
-    
+
     public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
         for (int i = 0; i < callbacks.length; i++) {
             if (callbacks[i] instanceof WReqCallback) {

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyPreAuthSpringTest.java
----------------------------------------------------------------------
diff --git a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyPreAuthSpringTest.java b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyPreAuthSpringTest.java
index cca8d6a..ab19290 100644
--- a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyPreAuthSpringTest.java
+++ b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyPreAuthSpringTest.java
@@ -36,9 +36,9 @@ public class JettyPreAuthSpringTest extends AbstractTests {
 
     static String idpHttpsPort;
     static String rpHttpsPort;
-    
+
     private static Tomcat idpServer;
-    
+
     @BeforeClass
     public static void init() {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -47,7 +47,7 @@ public class JettyPreAuthSpringTest extends AbstractTests {
         System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.webflow", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.security.web", "info");
-        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info"); 
+        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info");
 
         idpHttpsPort = System.getProperty("idp.https.port");
         Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort);
@@ -55,11 +55,11 @@ public class JettyPreAuthSpringTest extends AbstractTests {
         Assert.assertNotNull("Property 'rp.https.port' null", rpHttpsPort);
 
         initIdp();
-        
+
         JettyUtils.initRpServer();
         JettyUtils.startRpServer();
     }
-    
+
     @AfterClass
     public static void cleanup() {
         try {
@@ -73,10 +73,10 @@ public class JettyPreAuthSpringTest extends AbstractTests {
         } catch (Exception e) {
             e.printStackTrace();
         }
-        
+
         JettyUtils.stopRpServer();
     }
-    
+
     private static void initIdp() {
         try {
             idpServer = new Tomcat();
@@ -84,11 +84,11 @@ public class JettyPreAuthSpringTest extends AbstractTests {
             String currentDir = new File(".").getCanonicalPath();
             String baseDir = currentDir + File.separator + "target";
             idpServer.setBaseDir(baseDir);
-            
+
             idpServer.getHost().setAppBase("tomcat/idp/webapps");
             idpServer.getHost().setAutoDeploy(true);
             idpServer.getHost().setDeployOnStartup(true);
-            
+
             Connector httpsConnector = new Connector();
             httpsConnector.setPort(Integer.parseInt(idpHttpsPort));
             httpsConnector.setSecure(true);
@@ -104,13 +104,13 @@ public class JettyPreAuthSpringTest extends AbstractTests {
             httpsConnector.setAttribute("SSLEnabled", true);
 
             idpServer.getService().addConnector(httpsConnector);
-            
+
             File stsWebapp = new File(baseDir + File.separator + idpServer.getHost().getAppBase(), "fediz-idp-sts");
             idpServer.addWebapp("/fediz-idp-sts", stsWebapp.getAbsolutePath());
-    
+
             File idpWebapp = new File(baseDir + File.separator + idpServer.getHost().getAppBase(), "fediz-idp");
             idpServer.addWebapp("/fediz-idp", idpWebapp.getAbsolutePath());
-            
+
             idpServer.start();
         } catch (Exception e) {
             e.printStackTrace();
@@ -127,16 +127,16 @@ public class JettyPreAuthSpringTest extends AbstractTests {
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     @Override
     public String getServletContextName() {
         return "fedizspringhelloworld";
     }
-    
+
     @Ignore("This tests is currently failing on Jetty")
     @Override
     public void testConcurrentRequests() throws Exception {
         // super.testConcurrentRequests();
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyTest.java
----------------------------------------------------------------------
diff --git a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyTest.java b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyTest.java
index b961449..5c7adee 100644
--- a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyTest.java
+++ b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyTest.java
@@ -34,9 +34,9 @@ public class JettyTest extends AbstractTests {
 
     static String idpHttpsPort;
     static String rpHttpsPort;
-    
+
     private static Tomcat idpServer;
-    
+
     @BeforeClass
     public static void init() {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -48,18 +48,18 @@ public class JettyTest extends AbstractTests {
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.security", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info");
-        
+
         idpHttpsPort = System.getProperty("idp.https.port");
         Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort);
         rpHttpsPort = System.getProperty("rp.https.port");
         Assert.assertNotNull("Property 'rp.https.port' null", rpHttpsPort);
 
         initIdp();
-        
+
         JettyUtils.initRpServer();
         JettyUtils.startRpServer();
     }
-    
+
     @AfterClass
     public static void cleanup() {
         try {
@@ -73,10 +73,10 @@ public class JettyTest extends AbstractTests {
         } catch (Exception e) {
             e.printStackTrace();
         }
-        
+
         JettyUtils.stopRpServer();
     }
-    
+
     private static void initIdp() {
         try {
             idpServer = new Tomcat();
@@ -84,11 +84,11 @@ public class JettyTest extends AbstractTests {
             String currentDir = new File(".").getCanonicalPath();
             String baseDir = currentDir + File.separator + "target";
             idpServer.setBaseDir(baseDir);
-            
+
             idpServer.getHost().setAppBase("tomcat/idp/webapps");
             idpServer.getHost().setAutoDeploy(true);
             idpServer.getHost().setDeployOnStartup(true);
-            
+
             Connector httpsConnector = new Connector();
             httpsConnector.setPort(Integer.parseInt(idpHttpsPort));
             httpsConnector.setSecure(true);
@@ -104,13 +104,13 @@ public class JettyTest extends AbstractTests {
             httpsConnector.setAttribute("SSLEnabled", true);
 
             idpServer.getService().addConnector(httpsConnector);
-            
+
             File stsWebapp = new File(baseDir + File.separator + idpServer.getHost().getAppBase(), "fediz-idp-sts");
             idpServer.addWebapp("/fediz-idp-sts", stsWebapp.getAbsolutePath());
-    
+
             File idpWebapp = new File(baseDir + File.separator + idpServer.getHost().getAppBase(), "fediz-idp");
             idpServer.addWebapp("/fediz-idp", idpWebapp.getAbsolutePath());
-            
+
             idpServer.start();
         } catch (Exception e) {
             e.printStackTrace();
@@ -126,16 +126,16 @@ public class JettyTest extends AbstractTests {
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     @Override
     public String getServletContextName() {
         return "fedizhelloworld";
     }
-    
+
     @Ignore("This tests is currently failing on Jetty")
     @Override
     public void testConcurrentRequests() throws Exception {
         // super.testConcurrentRequests();
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyUtils.java
----------------------------------------------------------------------
diff --git a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyUtils.java b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyUtils.java
index a4465c1..43b1207 100644
--- a/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyUtils.java
+++ b/systests/jetty9/src/test/java/org/apache/cxf/fediz/integrationtests/JettyUtils.java
@@ -26,27 +26,27 @@ import org.eclipse.jetty.xml.XmlConfiguration;
 public final class JettyUtils {
 
     private static Server rpServer;
-    
+
     private JettyUtils() {
     }
-        
+
     public static void initRpServer() {
         initRpServer("rp-server.xml");
     }
-    
+
     public static void initRpServer(String configurationFile) {
         if (rpServer == null) {
             try {
                 Resource testServerConfig = Resource.newSystemResource(configurationFile);
                 XmlConfiguration configuration = new XmlConfiguration(testServerConfig.getInputStream());
-                rpServer = (Server)configuration.configure();   
-                
+                rpServer = (Server)configuration.configure();
+
             } catch (Exception e) {
                 e.printStackTrace();
             }
         }
     }
-    
+
     public static void startRpServer() {
         if (rpServer != null && !rpServer.isStarted()) {
             try {
@@ -56,7 +56,7 @@ public final class JettyUtils {
             }
         }
     }
-    
+
     public static void stopRpServer() {
         if (rpServer != null && rpServer.isStarted()) {
             try {
@@ -66,5 +66,5 @@ public final class JettyUtils {
             }
         }
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosClientPasswordCallback.java
----------------------------------------------------------------------
diff --git a/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosClientPasswordCallback.java b/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosClientPasswordCallback.java
index 798e681..e1da412 100644
--- a/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosClientPasswordCallback.java
+++ b/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosClientPasswordCallback.java
@@ -31,7 +31,7 @@ import javax.security.auth.callback.UnsupportedCallbackException;
  * A CallbackHandler implementation for the kerberos client.
  */
 public class KerberosClientPasswordCallback implements CallbackHandler {
-    
+
     public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
         for (int i = 0; i < callbacks.length; i++) {
             if (callbacks[i] instanceof NameCallback) {
@@ -43,6 +43,6 @@ public class KerberosClientPasswordCallback implements CallbackHandler {
             }
         }
     }
-    
+
 
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosServicePasswordCallback.java
----------------------------------------------------------------------
diff --git a/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosServicePasswordCallback.java b/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosServicePasswordCallback.java
index ea74a8c..39be74b 100644
--- a/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosServicePasswordCallback.java
+++ b/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosServicePasswordCallback.java
@@ -33,14 +33,14 @@ import org.apache.wss4j.common.kerberos.KerberosContextAndServiceNameCallback;
  *  A CallbackHandler implementation for the kerberos service.
  */
 public class KerberosServicePasswordCallback implements CallbackHandler {
-    
+
     public KerberosServicePasswordCallback() {
     }
 
     public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
         for (int i = 0; i < callbacks.length; i++) {
             if (callbacks[i] instanceof KerberosContextAndServiceNameCallback) {
-                KerberosContextAndServiceNameCallback pc = 
+                KerberosContextAndServiceNameCallback pc =
                     (KerberosContextAndServiceNameCallback)callbacks[i];
                 pc.setContextName("bob");
                 pc.setServiceName("bob@service.ws.apache.org");
@@ -53,6 +53,6 @@ public class KerberosServicePasswordCallback implements CallbackHandler {
             }
         }
     }
-    
+
 
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosTest.java
----------------------------------------------------------------------
diff --git a/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosTest.java b/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosTest.java
index bfbcdfc..2d2bfb5 100644
--- a/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosTest.java
+++ b/systests/kerberos/src/test/java/org/apache/cxf/fediz/integrationtests/KerberosTest.java
@@ -69,7 +69,7 @@ import org.junit.runner.RunWith;
  * A test that sends a Kerberos ticket to the IdP for authentication. The IdP must be configured
  * to validate the Kerberos ticket, and in turn get a delegation token to authenticate to the
  * STS + retrieve claims etc.
- * 
+ *
  * This test uses an Apache DS instance as the KDC
  */
 
@@ -110,11 +110,11 @@ public class KerberosTest extends AbstractLdapTestUnit {
 
     static String idpHttpsPort;
     static String rpHttpsPort;
-    
+
     private static Tomcat idpServer;
     private static Tomcat rpServer;
     private static boolean portUpdated;
-    
+
     @BeforeClass
     public static void init() throws Exception {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -124,19 +124,19 @@ public class KerberosTest extends AbstractLdapTestUnit {
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.webflow", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.security.web", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info");
-        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info");  
-        
+        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info");
+
         idpHttpsPort = System.getProperty("idp.https.port");
         Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort);
         rpHttpsPort = System.getProperty("rp.https.port");
         Assert.assertNotNull("Property 'rp.https.port' null", rpHttpsPort);
 
         WSSConfig.init();
-        
+
         idpServer = startServer(true, idpHttpsPort);
         rpServer = startServer(false, rpHttpsPort);
     }
-    
+
     @Before
     public void updatePort() throws Exception {
         if (!portUpdated) {
@@ -144,28 +144,28 @@ public class KerberosTest extends AbstractLdapTestUnit {
             if (basedir == null) {
                 basedir = new File(".").getCanonicalPath();
             }
-            
+
             // Read in krb5.conf and substitute in the correct port
             File f = new File(basedir + "/src/test/resources/krb5.conf");
-            
+
             FileInputStream inputStream = new FileInputStream(f);
             String content = IOUtils.toString(inputStream, "UTF-8");
             inputStream.close();
             content = content.replaceAll("port", "" + super.getKdcServer().getTransports()[0].getPort());
-            
+
             File f2 = new File(basedir + "/target/test-classes/fediz.kerberos.krb5.conf");
             try (FileOutputStream outputStream = new FileOutputStream(f2)) {
                 IOUtils.write(content, outputStream, "UTF-8");
             }
-            
+
             System.setProperty("java.security.krb5.conf", f2.getPath());
             portUpdated = true;
         }
-        
+
         System.setProperty("java.security.auth.login.config", "src/test/resources/kerberos.jaas");
     }
-    
-    private static Tomcat startServer(boolean idp, String port) 
+
+    private static Tomcat startServer(boolean idp, String port)
         throws ServletException, LifecycleException, IOException {
         Tomcat server = new Tomcat();
         server.setPort(0);
@@ -200,13 +200,13 @@ public class KerberosTest extends AbstractLdapTestUnit {
         if (idp) {
             File stsWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp-sts");
             server.addWebapp("/fediz-idp-sts", stsWebapp.getAbsolutePath());
-    
+
             File idpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp");
             server.addWebapp("/fediz-idp", idpWebapp.getAbsolutePath());
         } else {
             File rpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "simpleWebapp");
             Context cxt = server.addWebapp("/fedizhelloworld", rpWebapp.getAbsolutePath());
-            
+
             FederationAuthenticator fa = new FederationAuthenticator();
             fa.setConfigFile(currentDir + File.separator + "target" + File.separator
                              + "test-classes" + File.separator + "fediz_config.xml");
@@ -217,13 +217,13 @@ public class KerberosTest extends AbstractLdapTestUnit {
 
         return server;
     }
-    
+
     @AfterClass
     public static void cleanup() {
         shutdownServer(idpServer);
         shutdownServer(rpServer);
     }
-    
+
     private static void shutdownServer(Tomcat server) {
         try {
             if (server != null && server.getServer() != null
@@ -245,20 +245,20 @@ public class KerberosTest extends AbstractLdapTestUnit {
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     public String getServletContextName() {
         return "fedizhelloworld";
     }
-    
+
     @org.junit.Test
     public void testKerberos() throws Exception {
         String url = "https://localhost:" + getRpHttpsPort() + "/fedizhelloworld/secure/fedservlet";
         // Get a Kerberos Ticket +  Base64 encode it
         String ticket = getEncodedKerberosTicket(false);
-        
+
         final WebClient webClient = new WebClient();
         webClient.getOptions().setUseInsecureSSL(true);
-        
+
         webClient.getOptions().setJavaScriptEnabled(false);
         webClient.addRequestHeader("Authorization", "Negotiate " + ticket);
         final HtmlPage idpPage = webClient.getPage(url);
@@ -281,7 +281,7 @@ public class KerberosTest extends AbstractLdapTestUnit {
                           bodyTextContent.contains("role:Manager=false"));
         Assert.assertTrue("User " + user + " must have role User",
                           bodyTextContent.contains("role:User=true"));
-        
+
         String claim = ClaimTypes.FIRSTNAME.toString();
         Assert.assertTrue("User " + user + " claim " + claim + " is not 'Alice'",
                           bodyTextContent.contains(claim + "=Alice"));
@@ -291,10 +291,10 @@ public class KerberosTest extends AbstractLdapTestUnit {
         claim = ClaimTypes.EMAILADDRESS.toString();
         Assert.assertTrue("User " + user + " claim " + claim + " is not 'alice@realma.org'",
                           bodyTextContent.contains(claim + "=alice@realma.org"));
-        
+
         webClient.close();
     }
-    
+
     // To get this test to work, uncomment the "spnego" configuration in the STS's kerberos.xml
     @org.junit.Test
     @org.junit.Ignore
@@ -302,10 +302,10 @@ public class KerberosTest extends AbstractLdapTestUnit {
         String url = "https://localhost:" + getRpHttpsPort() + "/fedizhelloworld/secure/fedservlet";
         // Get a Kerberos Ticket +  Base64 encode it
         String ticket = getEncodedKerberosTicket(true);
-        
+
         final WebClient webClient = new WebClient();
         webClient.getOptions().setUseInsecureSSL(true);
-        
+
         webClient.getOptions().setJavaScriptEnabled(false);
         webClient.addRequestHeader("Authorization", "Negotiate " + ticket);
         final HtmlPage idpPage = webClient.getPage(url);
@@ -328,7 +328,7 @@ public class KerberosTest extends AbstractLdapTestUnit {
                           bodyTextContent.contains("role:Manager=false"));
         Assert.assertTrue("User " + user + " must have role User",
                           bodyTextContent.contains("role:User=true"));
-        
+
         String claim = ClaimTypes.FIRSTNAME.toString();
         Assert.assertTrue("User " + user + " claim " + claim + " is not 'Alice'",
                           bodyTextContent.contains(claim + "=Alice"));
@@ -338,39 +338,39 @@ public class KerberosTest extends AbstractLdapTestUnit {
         claim = ClaimTypes.EMAILADDRESS.toString();
         Assert.assertTrue("User " + user + " claim " + claim + " is not 'alice@realma.org'",
                           bodyTextContent.contains(claim + "=alice@realma.org"));
-        
+
         webClient.close();
     }
-    
+
     private String getEncodedKerberosTicket(boolean spnego) throws Exception {
-        
+
         Oid kerberos5Oid = null;
         if (spnego) {
             kerberos5Oid = new Oid("1.3.6.1.5.5.2");
         } else {
             kerberos5Oid = new Oid("1.2.840.113554.1.2.2");
         }
-        
+
         GSSManager manager = GSSManager.getInstance();
-        GSSName serverName = manager.createName("bob@service.ws.apache.org", 
+        GSSName serverName = manager.createName("bob@service.ws.apache.org",
                                                 GSSName.NT_HOSTBASED_SERVICE);
 
         GSSContext context = manager
-                .createContext(serverName.canonicalize(kerberos5Oid), kerberos5Oid, 
+                .createContext(serverName.canonicalize(kerberos5Oid), kerberos5Oid,
                                null, GSSContext.DEFAULT_LIFETIME);
-        
+
         context.requestCredDeleg(true);
-        
+
         final byte[] token = new byte[0];
 
         String contextName = "alice";
         LoginContext lc = new LoginContext(contextName, new KerberosClientPasswordCallback());
         lc.login();
-        
+
         byte[] ticket = (byte[])Subject.doAs(lc.getSubject(), new CreateServiceTicketAction(context, token));
         return Base64.encode(ticket);
     }
-    
+
     private final class CreateServiceTicketAction implements PrivilegedExceptionAction<byte[]> {
         private final GSSContext context;
         private final byte[] token;
@@ -384,5 +384,5 @@ public class KerberosTest extends AbstractLdapTestUnit {
             return context.initSecContext(token, 0, token.length);
         }
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2ca31863/systests/ldap/src/test/java/org/apache/cxf/fediz/integrationtests/LDAPTest.java
----------------------------------------------------------------------
diff --git a/systests/ldap/src/test/java/org/apache/cxf/fediz/integrationtests/LDAPTest.java b/systests/ldap/src/test/java/org/apache/cxf/fediz/integrationtests/LDAPTest.java
index 658dcea..f090590 100644
--- a/systests/ldap/src/test/java/org/apache/cxf/fediz/integrationtests/LDAPTest.java
+++ b/systests/ldap/src/test/java/org/apache/cxf/fediz/integrationtests/LDAPTest.java
@@ -87,11 +87,11 @@ public class LDAPTest extends AbstractLdapTestUnit {
 
     static String idpHttpsPort;
     static String rpHttpsPort;
-    
+
     private static Tomcat idpServer;
     private static Tomcat rpServer;
     private static boolean portUpdated;
-    
+
     @Before
     public void init() throws Exception {
         System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
@@ -101,61 +101,61 @@ public class LDAPTest extends AbstractLdapTestUnit {
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.webflow", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.security.web", "info");
         System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info");
-        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info");  
-        
+        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info");
+
         idpHttpsPort = System.getProperty("idp.https.port");
         Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort);
         rpHttpsPort = System.getProperty("rp.https.port");
         Assert.assertNotNull("Property 'rp.https.port' null", rpHttpsPort);
 
         WSSConfig.init();
-        
+
         updatePort();
-        
+
         idpServer = startServer(true, idpHttpsPort);
         rpServer = startServer(false, rpHttpsPort);
     }
-    
+
     public void updatePort() throws Exception {
         if (!portUpdated) {
             String basedir = System.getProperty("basedir");
             if (basedir == null) {
                 basedir = new File(".").getCanonicalPath();
             }
-            
+
             // Read in ldap.xml and substitute in the correct port
             File f = new File(basedir + "/src/test/resources/sts/ldap.xml");
-            
+
             FileInputStream inputStream = new FileInputStream(f);
             String content = IOUtils.toString(inputStream, "UTF-8");
             inputStream.close();
             content = content.replaceAll("portno", "" + super.getLdapServer().getPort());
-            
+
             File f2 = new File(basedir + "/target/tomcat/idp/webapps/fediz-idp-sts/WEB-INF/endpoints/ldap.xml");
             try (FileOutputStream outputStream = new FileOutputStream(f2)) {
                 IOUtils.write(content, outputStream, "UTF-8");
             }
-            
+
             // Read in ldap.jaas and substitute in the correct port
             f = new File(basedir + "/src/test/resources/ldap.jaas");
-            
+
             inputStream = new FileInputStream(f);
             content = IOUtils.toString(inputStream, "UTF-8");
             inputStream.close();
             content = content.replaceAll("portno", "" + super.getLdapServer().getPort());
-            
+
             f2 = new File(basedir + "/target/test-classes/ldap.jaas");
             try (FileOutputStream outputStream = new FileOutputStream(f2)) {
                 IOUtils.write(content, outputStream, "UTF-8");
             }
-            
+
             portUpdated = true;
         }
-        
+
         System.setProperty("java.security.auth.login.config", "target/test-classes/ldap.jaas");
     }
-    
-    private static Tomcat startServer(boolean idp, String port) 
+
+    private static Tomcat startServer(boolean idp, String port)
         throws ServletException, LifecycleException, IOException {
         Tomcat server = new Tomcat();
         server.setPort(0);
@@ -190,13 +190,13 @@ public class LDAPTest extends AbstractLdapTestUnit {
         if (idp) {
             File stsWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp-sts");
             server.addWebapp("/fediz-idp-sts", stsWebapp.getAbsolutePath());
-    
+
             File idpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp");
             server.addWebapp("/fediz-idp", idpWebapp.getAbsolutePath());
         } else {
             File rpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "simpleWebapp");
             Context cxt = server.addWebapp("/fedizhelloworld", rpWebapp.getAbsolutePath());
-            
+
             FederationAuthenticator fa = new FederationAuthenticator();
             fa.setConfigFile(currentDir + File.separator + "target" + File.separator
                              + "test-classes" + File.separator + "fediz_config.xml");
@@ -207,13 +207,13 @@ public class LDAPTest extends AbstractLdapTestUnit {
 
         return server;
     }
-    
+
     @After
     public void cleanup() {
         shutdownServer(idpServer);
         shutdownServer(rpServer);
     }
-    
+
     private static void shutdownServer(Tomcat server) {
         try {
             if (server != null && server.getServer() != null
@@ -235,7 +235,7 @@ public class LDAPTest extends AbstractLdapTestUnit {
     public String getRpHttpsPort() {
         return rpHttpsPort;
     }
-    
+
     public String getServletContextName() {
         return "fedizhelloworld";
     }
@@ -247,7 +247,7 @@ public class LDAPTest extends AbstractLdapTestUnit {
         Thread.sleep(5 * 60 * 1000);
     }
     */
-    
+
     @Test
     public void testLDAP() throws Exception {
         String url = "https://localhost:" + getRpHttpsPort() + "/" + getServletContextName()
@@ -278,6 +278,6 @@ public class LDAPTest extends AbstractLdapTestUnit {
                           bodyTextContent.contains(claim + "=alice@realma.org"));
 
     }
-    
-    
+
+
 }


Mime
View raw message