cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From owu...@apache.org
Subject svn commit: r1339377 [1/3] - in /cxf/fediz/trunk: ./ examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/ examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ examples/wsclientWebapp/webapp/src/main/webapp/WEB-INF/wsd...
Date Wed, 16 May 2012 21:29:55 GMT
Author: owulff
Date: Wed May 16 21:29:53 2012
New Revision: 1339377

URL: http://svn.apache.org/viewvc?rev=1339377&view=rev
Log:
Checkstyle issues fixed

Removed:
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationConfiguration.java
Modified:
    cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java
    cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
    cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java
    cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ApplicationContextProvider.java
    cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java
    cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
    cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java
    cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java
    cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl
    cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/pom.xml
    cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java
    cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/Claim.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/ClaimCollection.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/ClaimTypes.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationConstants.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationPrincipal.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessor.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationRequest.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationResponse.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/TokenReplayCache.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/TokenReplayCacheInMemory.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/TokenValidator.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/TokenValidatorResponse.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Authentication.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/CertStore.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/CertificateValidationMethod.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Claim.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationConfigurator.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationContext.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationProtocol.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/HomeRealm.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/KeyStore.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/PropertyType.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Protocol.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/TrustManager.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/TrustedIssuer.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/exception/IllegalConfigurationException.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/CertConstraintsParser.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/spi/AbstractServletCallback.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/spi/IDPCallback.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/spi/WAuthCallback.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/util/DOMUtils.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/util/StringUtils.java
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/util/XMLUtils.java
    cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/FederationProcessorTest.java
    cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationTest.java
    cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationWriterTest.java
    cxf/fediz/trunk/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
    cxf/fediz/trunk/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationPrincipalImpl.java
    cxf/fediz/trunk/pom.xml
    cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpSTSClient.java
    cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpServlet.java
    cxf/fediz/trunk/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/FileClaimsHandler.java

Modified: cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java (original)
+++ cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java Wed May 16 21:29:53 2012
@@ -1,19 +1,22 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
+
 package org.apache.cxf.fediz.example;
 
 import java.io.IOException;
@@ -44,7 +47,6 @@ public class FederationFilter implements
         if (attrName != null) {
             securityTokenAttr = attrName;
         }
-
     }
 
     @Override
@@ -60,7 +62,7 @@ public class FederationFilter implements
                     chain.doFilter(request, response);
                 } finally {
                     SecurityTokenThreadLocal.setToken(null);
-                }		
+                }
             } else {
                 chain.doFilter(request, response);
             }

Modified: cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java (original)
+++ cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java Wed May 16 21:29:53 2012
@@ -1,19 +1,22 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
+
 package org.apache.cxf.fediz.example;
 
 import java.io.IOException;
@@ -33,11 +36,13 @@ import javax.xml.transform.TransformerFa
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
+import org.w3c.dom.Element;
+
 import org.apache.commons.lang3.StringEscapeUtils;
 import org.apache.cxf.fediz.core.Claim;
 import org.apache.cxf.fediz.core.ClaimCollection;
 import org.apache.cxf.fediz.core.FederationPrincipal;
-import org.w3c.dom.Element;
+
 
 public class FederationServlet extends HttpServlet {
 
@@ -69,7 +74,7 @@ public class FederationServlet extends H
         out.println("<br><b>Roles</b><p>");
         List<String> roleListToCheck = Arrays.asList("Admin", "Manager", "User", "Authenticated");
         for (String item: roleListToCheck) {
-            out.println("Has role '" + item + "': " + ((request.isUserInRole(item)) ? "<b>yes</b>" : "no") + "<p>" );
+            out.println("Has role '" + item + "': " + ((request.isUserInRole(item)) ? "<b>yes</b>" : "no") + "<p>");
         }
 
         if (p instanceof FederationPrincipal) {
@@ -84,9 +89,6 @@ public class FederationServlet extends H
             out.println("Principal is not instance of FederationPrincipal");
         }
 
-
-        //FederationResponse fd = (FederationResponse)request.getSession().getAttribute(FederationAuthenticator.FEDERATION_NOTE);
-
         Element el = SecurityTokenThreadLocal.getToken();
         if (el != null) {
             out.println("<p>Bootstrap token...");

Modified: cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java (original)
+++ cxf/fediz/trunk/examples/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java Wed May 16 21:29:53 2012
@@ -1,19 +1,22 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
+
 package org.apache.cxf.fediz.example;
 
 import org.w3c.dom.Element;
@@ -22,17 +25,22 @@ import org.w3c.dom.Element;
 /**
  * Thread local storage for security token
  */
-public class SecurityTokenThreadLocal {
+public final class SecurityTokenThreadLocal {
 
-    private static final ThreadLocal<Element> threadToken = 
+    private static final ThreadLocal<Element> TLS = 
         new ThreadLocal<Element>() {
-    };
+        };
 
+    private SecurityTokenThreadLocal() {
+    }    
+        
     public static void setToken(Element token) {
-        threadToken.set(token);
+        TLS.set(token);
     }
 
     public static Element getToken() {
-        return threadToken.get();
+        return TLS.get();
     }
+    
+
 }
\ No newline at end of file

Modified: cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ApplicationContextProvider.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ApplicationContextProvider.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ApplicationContextProvider.java (original)
+++ cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ApplicationContextProvider.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.example;
@@ -29,16 +31,16 @@ import org.springframework.stereotype.Co
 @Component
 public class ApplicationContextProvider implements ApplicationContextAware {
 
-    private static ApplicationContext ctx = null;
+    private static ApplicationContext ctx;
 
     public ApplicationContextProvider() {
         super();
     }
 
-    public void setApplicationContext(ApplicationContext ctx)
-    throws BeansException {
+    public void setApplicationContext(ApplicationContext applicationContext)
+        throws BeansException {
 
-        ApplicationContextProvider.ctx = ctx;
+        ApplicationContextProvider.ctx = applicationContext;
     }
 
     public static ApplicationContext getContext() {

Modified: cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java (original)
+++ cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.example;
@@ -31,7 +33,6 @@ import org.w3c.dom.Element;
 
 /**
  * Add security token to thread local
- *
  */
 public class FederationFilter implements Filter {
 
@@ -46,7 +47,6 @@ public class FederationFilter implements
         if (attrName != null) {
             securityTokenAttr = attrName;
         }
-
     }
 
     @Override
@@ -57,13 +57,12 @@ public class FederationFilter implements
             HttpServletRequest hrequest = (HttpServletRequest)request;
             Element el = (Element)hrequest.getSession().getAttribute(securityTokenAttr);
             if (el != null) {
-                try
-                {
+                try {
                     SecurityTokenThreadLocal.setToken(el);
                     chain.doFilter(request, response);
                 } finally {
                     SecurityTokenThreadLocal.setToken(null);
-                }		
+                }
             } else {
                 chain.doFilter(request, response);
             }

Modified: cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java (original)
+++ cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.example;
@@ -34,12 +36,14 @@ import javax.xml.transform.TransformerFa
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
+import org.w3c.dom.Element;
+
 import org.apache.commons.lang3.StringEscapeUtils;
 import org.apache.cxf.fediz.core.Claim;
 import org.apache.cxf.fediz.core.ClaimCollection;
 import org.apache.cxf.fediz.core.FederationPrincipal;
 import org.apache.hello_world_soap_http.Greeter;
-import org.w3c.dom.Element;
+
 
 public class FederationServlet extends HttpServlet {
 
@@ -49,7 +53,7 @@ public class FederationServlet extends H
     private static final long serialVersionUID = -9019993850246851112L;
 
     public void doGet(HttpServletRequest request, HttpServletResponse response)
-    throws ServletException, IOException {
+        throws ServletException, IOException {
 
         response.setContentType("text/html");
         PrintWriter out = response.getWriter();
@@ -72,7 +76,7 @@ public class FederationServlet extends H
         out.println("<br><b>Roles</b><p>");
         List<String> roleListToCheck = Arrays.asList("Admin", "Manager", "User", "Authenticated");
         for (String item: roleListToCheck) {
-            out.println("Has role '" + item + "': " + ((request.isUserInRole(item)) ? "<b>yes</b>" : "no") + "<p>" );
+            out.println("Has role '" + item + "': " + ((request.isUserInRole(item)) ? "<b>yes</b>" : "no") + "<p>");
         }
 
         if (p instanceof FederationPrincipal) {
@@ -83,8 +87,7 @@ public class FederationServlet extends H
             for (Claim c: claims) {
                 out.println(c.getClaimType().toString() + ": " + c.getValue() + "<p>");
             }
-        }
-        else {
+        } else {
             out.println("Principal is not instance of FederationPrincipal");
         }
 
@@ -104,8 +107,7 @@ public class FederationServlet extends H
             } catch (Exception ex) {
                 out.println("<p>Failed to transform cached element to string: " + ex.toString());
             }
-        }
-        else {
+        } else {
             out.println("<p>Bootstrap token not cached in thread local storage");
         }
 
@@ -114,7 +116,7 @@ public class FederationServlet extends H
 
 
     public void doPost(HttpServletRequest request, HttpServletResponse response)
-    throws ServletException, IOException {
+        throws ServletException, IOException {
 
         response.setContentType("text/html");
         PrintWriter out = response.getWriter();
@@ -137,7 +139,7 @@ public class FederationServlet extends H
         out.println("<br><b>Roles</b><p>");
         List<String> roleListToCheck = Arrays.asList("Admin", "Manager", "User", "Authenticated");
         for (String item: roleListToCheck) {
-            out.println("Has role '" + item + "': " + ((request.isUserInRole(item)) ? "<b>yes</b>" : "no") + "<p>" );
+            out.println("Has role '" + item + "': " + ((request.isUserInRole(item)) ? "<b>yes</b>" : "no") + "<p>");
         }
 
         if (p instanceof FederationPrincipal) {
@@ -148,8 +150,7 @@ public class FederationServlet extends H
             for (Claim c: claims) {
                 out.println(c.getClaimType().toString() + ": " + c.getValue() + "<p>");
             }
-        }
-        else {
+        } else {
             out.println("Principal is not instance of FederationPrincipalImpl");
         }
 

Modified: cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java (original)
+++ cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.example;
@@ -22,19 +24,23 @@ import org.w3c.dom.Element;
 
 /**
  * Thread local storage for security token
- *
  */
-public class SecurityTokenThreadLocal {
+public final class SecurityTokenThreadLocal {
 
-    private static final ThreadLocal<Element> threadToken = 
+    private static final ThreadLocal<Element> TLS = 
         new ThreadLocal<Element>() {
-    };
+        };
 
+    private SecurityTokenThreadLocal() {
+    }    
+        
     public static void setToken(Element token) {
-        threadToken.set(token);
+        TLS.set(token);
     }
 
     public static Element getToken() {
-        return threadToken.get();
+        return TLS.get();
     }
-}
+    
+
+}
\ No newline at end of file

Modified: cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java (original)
+++ cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.example;
@@ -23,14 +25,12 @@ import javax.security.auth.callback.Call
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.UnsupportedCallbackException;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.w3c.dom.Element;
-
 import org.apache.cxf.ws.security.trust.delegation.DelegationCallback;
 import org.apache.ws.security.util.DOM2Writer;
 
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -39,22 +39,21 @@ import org.apache.ws.security.util.DOM2W
  */ 
 public class ThreadLocalCallbackHandler implements CallbackHandler {
 
-    private final static Logger log = LoggerFactory.getLogger(ThreadLocalCallbackHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ThreadLocalCallbackHandler.class);
 
 
-    public void handle(Callback[] callbacks)
-    throws IOException, UnsupportedCallbackException {
+    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
         for (int i = 0; i < callbacks.length; i++) {
             if (callbacks[i] instanceof DelegationCallback) {
                 DelegationCallback callback = (DelegationCallback) callbacks[i];
                 Element token = SecurityTokenThreadLocal.getToken();
                 if (token == null) {
-                    log.error("Security token not cached in thread local storage. Check configuration");
+                    LOG.error("Security token not cached in thread local storage. Check configuration");
                 } else {
-                    if(log.isDebugEnabled()){
-                        log.debug("******************** TOKEN ********************");
-                        log.debug(DOM2Writer.nodeToString(token));
-                        log.debug("****************** END TOKEN *******************");
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug("******************** TOKEN ********************");
+                        LOG.debug(DOM2Writer.nodeToString(token));
+                        LOG.debug("****************** END TOKEN *******************");
                     }
                     callback.setToken(token);     
                 }

Modified: cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl (original)
+++ cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl Wed May 16 21:29:53 2012
@@ -101,7 +101,9 @@
 					<wsp:Policy>
 						<sp:TransportToken>
 							<wsp:Policy>
-								<sp:HttpsToken RequireClientCertificate="false" />
+								<sp:HttpsToken RequireClientCertificate="false">
+									<wsp:Policy/>
+								</sp:HttpsToken>
 							</wsp:Policy>
 						</sp:TransportToken>
 						<sp:AlgorithmSuite>

Modified: cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/pom.xml
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/pom.xml?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/pom.xml (original)
+++ cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/pom.xml Wed May 16 21:29:53 2012
@@ -96,6 +96,19 @@
 			<version>1.6.1</version>
 			<scope>runtime</scope>
 		</dependency>
-
+                <dependency>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-context</artifactId>
+                        <version>3.0.6.RELEASE</version>
+                        <type>jar</type>
+                        <scope>compile</scope>
+                </dependency>
+                <dependency>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-web</artifactId>
+                        <version>3.0.6.RELEASE</version>
+                        <type>jar</type>
+                        <scope>compile</scope>
+                </dependency>
 	</dependencies>
 </project>

Modified: cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java (original)
+++ cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java Wed May 16 21:29:53 2012
@@ -1,37 +1,40 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.examples.service;
 
 import java.security.Principal;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import javax.annotation.Resource;
 import javax.xml.ws.WebServiceContext;
+
 import org.apache.hello_world_soap_http.Greeter;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public class GreeterImpl implements Greeter {
 
-    private final static Logger LOG = LoggerFactory.getLogger(GreeterImpl.class.getPackage().getName());
+    private static final Logger LOG = LoggerFactory.getLogger(GreeterImpl.class.getPackage().getName());
 
     @Resource
-    WebServiceContext context = null;
+    WebServiceContext context;
 
     public String greetMe() {
         LOG.info("Executing operation greetMe");

Modified: cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl (original)
+++ cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl Wed May 16 21:29:53 2012
@@ -101,7 +101,9 @@
 					<wsp:Policy>
 						<sp:TransportToken>
 							<wsp:Policy>
-								<sp:HttpsToken RequireClientCertificate="false" />
+								<sp:HttpsToken RequireClientCertificate="false">
+									<wsp:Policy/>
+								</sp:HttpsToken>
 							</wsp:Policy>
 						</sp:TransportToken>
 						<sp:AlgorithmSuite>

Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/Claim.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/Claim.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/Claim.java (original)
+++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/Claim.java Wed May 16 21:29:53 2012
@@ -1,41 +1,26 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.core;
 
 import java.io.Serializable;
 import java.net.URI;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
 import java.security.Principal;
 
 /**

Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/ClaimCollection.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/ClaimCollection.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/ClaimCollection.java (original)
+++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/ClaimCollection.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.core;

Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/ClaimTypes.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/ClaimTypes.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/ClaimTypes.java (original)
+++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/ClaimTypes.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.core;
@@ -24,6 +26,7 @@ import java.net.URI;
  * 
  * @author Oliver Wulff
  */
+//CHECKSTYLE:OFF
 public interface ClaimTypes {
     /**
      * The base XML namespace URI that is used by the claim types
@@ -66,7 +69,8 @@ public interface ClaimTypes {
 
     /**
      * (/ in [RFC 2256]) Locality component of a Subject's address information.
-     * According to RFC 2256: This attribute contains the name of a locality, such as a city, county or other geographic region.
+     * According to RFC 2256: This attribute contains the name of a locality, such as a city,
+     * county or other geographic region.
      */
     URI LOCALITY = 
         URI.create("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/locality"); 
@@ -95,21 +99,24 @@ public interface ClaimTypes {
 
     /**
      * (homePhone in inetOrgPerson) Primary or home telephone number of a Subject.
-     * According to inetOrgPerson using [RFC 1274]: This attribute type specifies a home telephone number associated with a person.
+     * According to inetOrgPerson using [RFC 1274]: This attribute type specifies
+     * a home telephone number associated with a person.
      */
     URI HOMEPHONE = 
         URI.create("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/homephone");
 
     /**
      * (telephoneNumber in X.500 Person) Secondary or work telephone number of a Subject.
-     * According to X.500(2001): This attribute type specifies an office/campus telephone number associated with a person.
+     * According to X.500(2001): This attribute type specifies an
+     * office/campus telephone number associated with a person.
      */
     URI OTHERPHONE = 
         URI.create("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/otherphone");    
 
     /**
      * (mobile in inetOrgPerson) Mobile telephone number of a Subject.
-     * According to inetOrgPerson using [RFC 1274]: This attribute type specifies a mobile telephone number associated with a person.
+     * According to inetOrgPerson using [RFC 1274]: This attribute type specifies a
+     * mobile telephone number associated with a person.
      */
     URI MOBILEPHONE = 
         URI.create("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobilephone");

Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationConstants.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationConstants.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationConstants.java (original)
+++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationConstants.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.core;
@@ -23,10 +25,11 @@ import java.util.HashMap;
 import java.util.Map;
 
 public final class FederationConstants {
-
+   
     public static final String WSFED_METHOD = "WSFED";
 
-    public static final URI DEFAULT_ROLE_URI = URI.create("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role");
+    public static final URI DEFAULT_ROLE_URI = URI
+        .create("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role");
 
     /**
      * Constants defined in following spec:
@@ -34,8 +37,8 @@ public final class FederationConstants {
      */
 
     /**
-     * This REQUIRED parameter specifies the action to be performed.
-     * Note that this serves roughly the same purpose as the WS-Addressing Action header for the WS-Trust SOAP RST messages.
+     * This REQUIRED parameter specifies the action to be performed. Note that this serves roughly the same
+     * purpose as the WS-Addressing Action header for the WS-Trust SOAP RST messages.
      */
     public static final String PARAM_ACTION = "wa";
 
@@ -43,117 +46,111 @@ public final class FederationConstants {
     public static final String ACTION_SIGNOUT = "wsignout1.0";
     public static final String ACTION_SIGNOUT_CLEANUP = "wsignoutcleanup1.0";
 
-
     /**
-     * This OPTIONAL parameter is the URL to which responses are directed.
-     * Note that this serves roughly the same purpose as the WS-Addressing <wsa:ReplyTo> header for the WS-Trust SOAP RST messages.
+     * This OPTIONAL parameter is the URL to which responses are directed. Note that this serves roughly the
+     * same purpose as the WS-Addressing <wsa:ReplyTo> header for the WS-Trust SOAP RST messages.
      */
     public static final String PARAM_REPLY = "wreply";
 
-
     /**
-     * This REQUIRED parameter is the URI of the requesting realm. 
-     * Note that this serves roughly the same purpose as the AppliesTo element in the WS-Trust SOAP RST messages.
+     * This REQUIRED parameter is the URI of the requesting realm. Note that this serves roughly the same
+     * purpose as the AppliesTo element in the WS-Trust SOAP RST messages.
      */
     public static final String PARAM_TREALM = "wtrealm";
 
-
     /**
-     * This OPTIONAL parameter indicates the freshness requirements.
-     * If specified, this indicates the desired maximum age of authentication specified in minutes.
-     * An IP/STS SHOULD NOT issue a token with a longer lifetime.
-     * If specified as “0” it indicates a request for the IP/STS to re-prompt the user for authentication before issuing the token.
-     * Note that this serves roughly the same purpose as the Freshness element in the WS-Trust SOAP RST messages.
+     * This OPTIONAL parameter indicates the freshness requirements. If specified, this indicates the desired
+     * maximum age of authentication specified in minutes. An IP/STS SHOULD NOT issue a token with a longer
+     * lifetime. If specified as “0” it indicates a request for the IP/STS to re-prompt the user for
+     * authentication before issuing the token. Note that this serves roughly the same purpose as the
+     * Freshness element in the WS-Trust SOAP RST messages.
      */
     public static final String PARAM_FRESHNESS = "wfresh";
 
-
     /**
-     * This OPTIONAL parameter indicates the REQUIRED authentication level.
-     * Note that this parameter uses the same URIs and is equivalent to the wst:AuthenticationType element in the WS-Trust SOAP RST messages.
+     * This OPTIONAL parameter indicates the REQUIRED authentication level. Note that this parameter uses the
+     * same URIs and is equivalent to the wst:AuthenticationType element in the WS-Trust SOAP RST messages.
      */
     public static final String PARAM_AUTH_TYPE = "wauth";
 
-
     /**
-     * This OPTIONAL parameter specifies a token request using either a <wst:RequestSecurityToken> element or a full request message as described in WS-Trust.
-     * If this parameter is not specified, it is assumed that the responding service knows the correct type of token to return.
-     * Note that this can contain the same RST payload as used in WS-Trust RST messages.
+     * This OPTIONAL parameter specifies a token request using either a <wst:RequestSecurityToken> element or
+     * a full request message as described in WS-Trust. If this parameter is not specified, it is assumed that
+     * the responding service knows the correct type of token to return. Note that this can contain the same
+     * RST payload as used in WS-Trust RST messages.
      */
     public static final String PARAM_REQUEST = "wreq";
 
-
     /**
-     * This OPTIONAL parameter indicates the current time at the sender for ensuring freshness.  This parameter is the string encoding of time using the XML Schema datetime time using UTC notation.
-     * Note that this serves roughly the same purpose as the WS-Security Timestamp elements in the Security headers of the SOAP RST messages.
+     * This OPTIONAL parameter indicates the current time at the sender for ensuring freshness. This parameter
+     * is the string encoding of time using the XML Schema datetime time using UTC notation. Note that this
+     * serves roughly the same purpose as the WS-Security Timestamp elements in the Security headers of the
+     * SOAP RST messages.
      */
     public static final String PARAM_CURRENT_TIME = "wct";
 
-
     /**
-     * This OPTIONAL parameter is an opaque context value that MUST be returned with the issued token if it is passed in the request.
-     * Note that this serves roughly the same purpose as the WS-Trust SOAP RST @Context attribute.
+     * This OPTIONAL parameter is an opaque context value that MUST be returned with the issued token if it is
+     * passed in the request. Note that this serves roughly the same purpose as the WS-Trust SOAP RST @Context
+     * attribute.
      */
     public static final String PARAM_CONTEXT = "wctx";
 
-
     /**
-     * This OPTIONAL parameter is the URL for the policy which can be obtained using an HTTP GET
-     * and identifies the policy to be used related to the action specified in "wa", but MAY have a broader scope than just the "wa".
-     * Note that this serves roughly the same purpose as the Policy element in the WS-Trust SOAP RST messages.
+     * This OPTIONAL parameter is the URL for the policy which can be obtained using an HTTP GET and
+     * identifies the policy to be used related to the action specified in "wa", but MAY have a broader scope
+     * than just the "wa". Note that this serves roughly the same purpose as the Policy element in the
+     * WS-Trust SOAP RST messages.
      */
     public static final String PARAM_POLICY = "wp";
 
-
     /**
-     * This OPTIONAL parameter indicates the federation context in which the request is made.
-     * This is equivalent to the FederationId parameter in the RST message.
+     * This OPTIONAL parameter indicates the federation context in which the request is made. This is
+     * equivalent to the FederationId parameter in the RST message.
      */
     public static final String PARAM_FED_CONTEXT = "wfed";
 
-
     /**
-     * This OPTIONAL parameter indicates the encoding style to be used for XML parameter content.
-     * If not specified the default behavior is to use standard URL encoding rules
+     * This OPTIONAL parameter indicates the encoding style to be used for XML parameter content. If not
+     * specified the default behavior is to use standard URL encoding rules
      */
     public static final String PARAM_ENCODING = "wencoding";
 
-
     /**
-     * This REQUIRED parameter specifies the result of the token issuance.
-     * This can take the form of the <wst:RequestSecurityTokenResponse> element or <wst:RequestSecurityTokenResponseCollection> element, a SOAP security token request response (that is, a <S:Envelope>) as detailed in WS-Trust, or a SOAP <S:Fault> element.
+     * This REQUIRED parameter specifies the result of the token issuance. This can take the form of the
+     * <wst:RequestSecurityTokenResponse> element or <wst:RequestSecurityTokenResponseCollection> element, a
+     * SOAP security token request response (that is, a <S:Envelope>) as detailed in WS-Trust, or a SOAP
+     * <S:Fault> element.
      */
     public static final String PARAM_RESULT = "wresult";
 
-
     /**
-     * This  OPTIONAL parameter indicates the account partner realm of the client.  This parameter is used to indicate the IP/STS address for the requestor.
-     * This may be specified directly as a URL or indirectly as an identifier (e.g. urn: or uuid:).
-     * In the case of an identifier the recipient is expected to know how to translate this (or get it translated) to a URL.
-     * When the whr parameter is used, the resource, or its local IP/STS, typically removes the parameter and writes a cookie to the client browser to remember this setting for future requests.
-     * Then, the request proceeds in the same way as if it had not been provided.
-     * Note that this serves roughly the same purpose as federation metadata for discovering IP/STS locations previously discussed.
+     * This OPTIONAL parameter indicates the account partner realm of the client. This parameter is used to
+     * indicate the IP/STS address for the requestor. This may be specified directly as a URL or indirectly as
+     * an identifier (e.g. urn: or uuid:). In the case of an identifier the recipient is expected to know how
+     * to translate this (or get it translated) to a URL. When the whr parameter is used, the resource, or its
+     * local IP/STS, typically removes the parameter and writes a cookie to the client browser to remember
+     * this setting for future requests. Then, the request proceeds in the same way as if it had not been
+     * provided. Note that this serves roughly the same purpose as federation metadata for discovering IP/STS
+     * locations previously discussed.
      */
     public static final String PARAM_HOME_REALM = "whr";
 
-
     /**
-     * This OPTIONAL parameter specifies a URL for where to find the request expressed as a <wst:RequestSecurityToken> element.
-     * Note that this does not have a WS-Trust parallel.
-     * The wreqptr parameter MUST NOT be included in a token request if wreq is present.
+     * This OPTIONAL parameter specifies a URL for where to find the request expressed as a
+     * <wst:RequestSecurityToken> element. Note that this does not have a WS-Trust parallel. The wreqptr
+     * parameter MUST NOT be included in a token request if wreq is present.
      */
     public static final String PARAM_REQUEST_PTR = "wreqptr";
 
-
     /**
-     * This parameter specifies a URL to which an HTTP GET can be issued.
-     * The result is a document of type text/xml that contains the issuance result.
-     * This can either be the <wst:RequestSecurityTokenResponse> element, the <wst:RequestSecurityTokenResponseCollection> element, a SOAP response, or a SOAP <S:Fault> element.
+     * This parameter specifies a URL to which an HTTP GET can be issued. The result is a document of type
+     * text/xml that contains the issuance result. This can either be the <wst:RequestSecurityTokenResponse>
+     * element, the <wst:RequestSecurityTokenResponseCollection> element, a SOAP response, or a SOAP <S:Fault>
+     * element.
      */
     public static final String PARAM_RESULT_PTR = "wresultptr";
 
-
-
     public static final Map<String, URI> AUTH_TYPE_MAP;
     static {
         Map<String, URI> aMap = new HashMap<String, URI>();
@@ -162,53 +159,55 @@ public final class FederationConstants {
         aMap.put("SSL", FederationConstants.AUTH_TYPE_SSL);
         aMap.put("SSL_AND_KEY", FederationConstants.AUTH_TYPE_SSL_AND_KEY);
         aMap.put("SSL_STRONG_PASSWORD", FederationConstants.AUTH_TYPE_SSL_STRONG_PASSWORD);
-        aMap.put("SSL_STRONG_PASSWORD_EXPIRATION", FederationConstants.AUTH_TYPE_SSL_STRONG_PASSWORD_EXPIRATION);
+        aMap.put("SSL_STRONG_PASSWORD_EXPIRATION",
+                 FederationConstants.AUTH_TYPE_SSL_STRONG_PASSWORD_EXPIRATION);
         aMap.put("SMARTCARD", FederationConstants.AUTH_TYPE_SMARTCARD);
         AUTH_TYPE_MAP = Collections.unmodifiableMap(aMap);
     }
 
-
-
     /**
      * Unknown level of authentication
      */
-    public static final URI AUTH_TYPE_UNKNOWN = URI.create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/unknown");
+    public static final URI AUTH_TYPE_UNKNOWN = URI
+        .create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/unknown");
 
     /**
      * Default sign-in mechanisms
      */
-    public static final URI AUTH_TYPE_DEFAULT = URI.create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/default");
+    public static final URI AUTH_TYPE_DEFAULT = URI
+        .create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/default");
 
     /**
      * Sign-in using SSL
      */
-    public static final URI AUTH_TYPE_SSL = URI.create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/Ssl");
+    public static final URI AUTH_TYPE_SSL = URI
+        .create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/Ssl");
 
     /**
      * Sign-in using SSL and a security key
      */
-    public static final URI AUTH_TYPE_SSL_AND_KEY = URI.create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/SslAndKey");
+    public static final URI AUTH_TYPE_SSL_AND_KEY = URI
+        .create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/SslAndKey");
 
     /**
      * Sign-in using SSL and a “strong” password
      */
-    public static final URI AUTH_TYPE_SSL_STRONG_PASSWORD = URI.create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/SslAndStrongPasssword");
+    public static final URI AUTH_TYPE_SSL_STRONG_PASSWORD = URI
+        .create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/SslAndStrongPasssword");
 
     /**
      * Sign-in using SSL and a “strong” password with expiration
      */
-    public static final URI AUTH_TYPE_SSL_STRONG_PASSWORD_EXPIRATION = URI.create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/SslAndStrongPasswordWithExpiration");
+    public static final URI AUTH_TYPE_SSL_STRONG_PASSWORD_EXPIRATION = URI
+        .create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/SslAndStrongPasswordWithExpiration");
 
     /**
      * Sign-in using Smart Card
      */
-    public static final URI AUTH_TYPE_SMARTCARD = URI.create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/smartcard");
-
-
-
-
-
-
-
+    public static final URI AUTH_TYPE_SMARTCARD = URI
+        .create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/smartcard");
 
+    private FederationConstants() {
+        
+    }
 }

Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationPrincipal.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationPrincipal.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationPrincipal.java (original)
+++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationPrincipal.java Wed May 16 21:29:53 2012
@@ -1,65 +1,28 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-//[TODO] Should it be a Subject instead of Principal (tomcat uses a prinicpal in GenericPrinicpial)
-
 package org.apache.cxf.fediz.core;
 
 import java.security.Principal;
 
 public interface FederationPrincipal extends Principal {
 
-    public ClaimCollection getClaims();
+    ClaimCollection getClaims();
 
 }
-
-/*
-public class FederationPrincipal implements Principal {
-
-    protected String username = null;
-    protected List<String> roles = null;
-    protected ClaimCollection claims = null;
-
-    public FederationPrincipal(String username) {
-        this(username, null, null);
-    }
-
-    public FederationPrincipal(String username, List<String> roles) {
-        this(username, roles, null);
-    }
-
-    public FederationPrincipal(String username, List<String> roles,
-            ClaimCollection claims) {
-        this.username = username;
-        this.roles = roles;
-        this.claims = claims;
-    }
-
-    @Override
-    public String getName() {
-        return this.username;
-    }
-
-    public List<String> getRoles() {
-        return Collections.unmodifiableList(this.roles);
-    }
-
-    public ClaimCollection getClaims() {
-        return this.claims;
-    }
-
-}*/

Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessor.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessor.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessor.java (original)
+++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessor.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.core;
@@ -23,8 +25,8 @@ import org.apache.cxf.fediz.core.config.
 
 public interface FederationProcessor {
 
-    public FederationResponse processRequest(FederationRequest request, FederationContext config);
+    FederationResponse processRequest(FederationRequest request, FederationContext config);
     
-    public String createSignInRequest(HttpServletRequest request, FederationContext config);
+    String createSignInRequest(HttpServletRequest request, FederationContext config);
 
 }

Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java (original)
+++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.core;
@@ -29,6 +31,10 @@ import java.util.Date;
 import javax.servlet.http.HttpServletRequest;
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
 import org.apache.cxf.fediz.core.config.FederationContext;
 import org.apache.cxf.fediz.core.config.FederationProtocol;
 import org.apache.cxf.fediz.core.saml.SAMLTokenValidator;
@@ -37,9 +43,7 @@ import org.apache.ws.security.WSConstant
 import org.apache.ws.security.util.XmlSchemaDateFormat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
+
 
 public class FederationProcessorImpl implements FederationProcessor {
 
@@ -229,29 +233,27 @@ public class FederationProcessorImpl imp
     }
 
     @Override
-    public String createSignInRequest(HttpServletRequest request,
-                                      FederationContext config) {
+    public String createSignInRequest(HttpServletRequest request, FederationContext config) {
 
         String redirectURL = null;
-        //        if (this.getIssuerCallbackHandler() != null) {
-        //            org.apache.cxf.fediz.core.spi.IDPCallback callback = new org.apache.cxf.fediz.core.spi.IDPCallback(
-        //                    request);
-        //            try {
-        //                this.getIssuerCallbackHandler().handle(
-        //                        new Callback[] { callback });
-        //                redirectURL = callback.getIssuerUrl().toString();
-        //                String trustedIssuer = callback.getTrustedIssuer();
-        //                if (trustedIssuer != null && trustedIssuer.length() > 0) {
-        //                    request.getSessionInternal().setNote(TRUSTED_ISSUER,
-        //                            trustedIssuer);
-        //                }
-        //            } catch (Exception ex) {
-        //                log.error("Failed to handle callback: " + ex.getMessage());
-        //            }
-        //        } 
-        try
-        {
-            String issuerURL = ((FederationProtocol) config.getProtocol()).getIssuer();
+        // if (this.getIssuerCallbackHandler() != null) {
+        // org.apache.cxf.fediz.core.spi.IDPCallback callback = new org.apache.cxf.fediz.core.spi.IDPCallback(
+        // request);
+        // try {
+        // this.getIssuerCallbackHandler().handle(
+        // new Callback[] { callback });
+        // redirectURL = callback.getIssuerUrl().toString();
+        // String trustedIssuer = callback.getTrustedIssuer();
+        // if (trustedIssuer != null && trustedIssuer.length() > 0) {
+        // request.getSessionInternal().setNote(TRUSTED_ISSUER,
+        // trustedIssuer);
+        // }
+        // } catch (Exception ex) {
+        // log.error("Failed to handle callback: " + ex.getMessage());
+        // }
+        // }
+        try {
+            String issuerURL = ((FederationProtocol)config.getProtocol()).getIssuer();
             if (issuerURL != null && issuerURL.length() > 0) {
                 redirectURL = issuerURL;
             }
@@ -259,12 +261,10 @@ public class FederationProcessorImpl imp
 
             StringBuilder sb = new StringBuilder();
 
-            sb.append(FederationConstants.PARAM_ACTION).append('=')
-            .append(FederationConstants.ACTION_SIGNIN);
+            sb.append(FederationConstants.PARAM_ACTION).append('=').append(FederationConstants.ACTION_SIGNIN);
 
             sb.append('&').append(FederationConstants.PARAM_REPLY).append('=');
-            sb.append(URLEncoder
-                    .encode(request.getRequestURL().toString(), "UTF-8"));
+            sb.append(URLEncoder.encode(request.getRequestURL().toString(), "UTF-8"));
 
             String realm = null;
             FederationProtocol fp = null;
@@ -297,11 +297,10 @@ public class FederationProcessorImpl imp
             LOG.debug("wtrealm=" + realm);
 
             StringBuffer realmSb = new StringBuffer(request.getScheme());
-            realmSb.append("://").append(request.getServerName()).append(":")
-            .append(request.getServerPort())
-            .append(request.getContextPath());
+            realmSb.append("://").append(request.getServerName()).append(":").append(request.getServerPort())
+                .append(request.getContextPath());
             sb.append('&').append(FederationConstants.PARAM_TREALM).append('=')
-            .append(URLEncoder.encode(realm, "UTF-8"));
+                .append(URLEncoder.encode(realm, "UTF-8"));
             redirectURL = redirectURL + "?" + sb.toString();
         } catch (Exception ex) {
             LOG.error("Failed to create SignInRequest", ex);

Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationRequest.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationRequest.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationRequest.java (original)
+++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationRequest.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.core;

Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationResponse.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationResponse.java?rev=1339377&r1=1339376&r2=1339377&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationResponse.java (original)
+++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationResponse.java Wed May 16 21:29:53 2012
@@ -1,18 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.cxf.fediz.core;
@@ -36,67 +38,67 @@ public class FederationResponse {
     /**
      * Created time
      */
-     private Date tokenCreated;
+    private Date tokenCreated;
 
-     /**
-      * Expiration time
-      */
-     private Date tokenExpires;
-
-
-     public FederationResponse(String username, String issuer, List<String> roles, List<Claim> claims, String audience, Date created, Date expires, Element token, String uniqueTokenId) {
-         this.username = username;
-         this.issuer = issuer;
-         this.roles = roles;
-         this.claims = claims;
-         this.audience = audience;
-         this.tokenCreated = created;
-         this.tokenExpires = expires;
-         this.token = token;
-         this.uniqueTokenId = uniqueTokenId;
-     }
-
-     public String getUniqueTokenId() {
-         return uniqueTokenId;
-     }
-
-     public String getAudience() {
-         return audience;
-     }
-
-     public String getUsername() {
-         return username;
-     }
-
-     public List<String> getRoles() {
-         if (roles == null) {
-             return null;
-         }
-         return Collections.unmodifiableList(roles);
-     }
-
-     public String getIssuer() {
-         return issuer;
-     }
-
-     public List<Claim> getClaims() {
-         if (claims == null) {
-             return null;
-         }
-         return Collections.unmodifiableList(claims);
-     }
-
-     public Date getTokenCreated() {
-         return tokenCreated;
-     }
-
-     public Date getTokenExpires() {
-         return tokenExpires;
-     }
-
-     public Element getToken() {
-         return token;
-     }
+    /**
+     * Expiration time
+     */
+    private Date tokenExpires;
+
+    //CHECKSTYLE:OFF
+    public FederationResponse(String username, String issuer, List<String> roles, List<Claim> claims, String audience, Date created, Date expires, Element token, String uniqueTokenId) {
+        this.username = username;
+        this.issuer = issuer;
+        this.roles = roles;
+        this.claims = claims;
+        this.audience = audience;
+        this.tokenCreated = created;
+        this.tokenExpires = expires;
+        this.token = token;
+        this.uniqueTokenId = uniqueTokenId;
+    }
+
+    public String getUniqueTokenId() {
+        return uniqueTokenId;
+    }
+
+    public String getAudience() {
+        return audience;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public List<String> getRoles() {
+        if (roles == null) {
+            return null;
+        }
+        return Collections.unmodifiableList(roles);
+    }
+
+    public String getIssuer() {
+        return issuer;
+    }
+
+    public List<Claim> getClaims() {
+        if (claims == null) {
+            return null;
+        }
+        return Collections.unmodifiableList(claims);
+    }
+
+    public Date getTokenCreated() {
+        return tokenCreated;
+    }
+
+    public Date getTokenExpires() {
+        return tokenExpires;
+    }
+
+    public Element getToken() {
+        return token;
+    }
 
 
 }



Mime
View raw message