cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/4] [FEDIZ-7] - Largish refactor of Fediz code to accomadate other protocols
Date Thu, 19 Jun 2014 16:30:58 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 9260c9ea3 -> 08af52b6f


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationLoginService.java
----------------------------------------------------------------------
diff --git a/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationLoginService.java b/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationLoginService.java
index cb70f30..c1ca4b4 100644
--- a/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationLoginService.java
+++ b/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationLoginService.java
@@ -25,12 +25,12 @@ import java.util.List;
 
 import javax.security.auth.Subject;
 
-import org.apache.cxf.fediz.core.FederationProcessor;
-import org.apache.cxf.fediz.core.FederationProcessorImpl;
-import org.apache.cxf.fediz.core.FederationRequest;
-import org.apache.cxf.fediz.core.FederationResponse;
-import org.apache.cxf.fediz.core.config.FederationContext;
+import org.apache.cxf.fediz.core.config.FedizContext;
 import org.apache.cxf.fediz.core.exception.ProcessingException;
+import org.apache.cxf.fediz.core.processor.FederationProcessorImpl;
+import org.apache.cxf.fediz.core.processor.FedizProcessor;
+import org.apache.cxf.fediz.core.processor.FedizRequest;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.eclipse.jetty.security.IdentityService;
 import org.eclipse.jetty.security.LoginService;
 import org.eclipse.jetty.server.UserIdentity;
@@ -74,18 +74,18 @@ public class FederationLoginService extends AbstractLifeCycle implements LoginSe
     /**
      * username will be null since the credentials will contain all the relevant info
      */
-    public UserIdentity login(String username, Object credentials, FederationContext config) {
+    public UserIdentity login(String username, Object credentials, FedizContext config) {
         
         try {
-            FederationResponse wfRes = null;
-            FederationRequest wfReq = (FederationRequest)credentials;
+            FedizResponse wfRes = null;
+            FedizRequest wfReq = (FedizRequest)credentials;
             
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Process SignIn request");
                 LOG.debug("wresult=\n" + wfReq.getWresult());
             }
             
-            FederationProcessor wfProc = new FederationProcessorImpl();
+            FedizProcessor wfProc = new FederationProcessorImpl();
             try {
                 wfRes = wfProc.processRequest(wfReq, config);
             } catch (ProcessingException ex) {

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserIdentity.java
----------------------------------------------------------------------
diff --git a/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserIdentity.java b/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserIdentity.java
index 002b045..724d3a5 100644
--- a/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserIdentity.java
+++ b/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserIdentity.java
@@ -26,8 +26,7 @@ import java.util.Date;
 import javax.security.auth.Subject;
 
 import org.w3c.dom.Element;
-
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.eclipse.jetty.server.UserIdentity;
 
 public class FederationUserIdentity implements UserIdentity {
@@ -35,10 +34,10 @@ public class FederationUserIdentity implements UserIdentity {
     private Subject subject;
     private Principal principal;
     private String[] roles;
-    private FederationResponse fedResponse;
+    private FedizResponse fedResponse;
 
     public FederationUserIdentity(Subject subject, Principal principal,
-                                  String[] roles, FederationResponse fedResponse) {
+                                  String[] roles, FedizResponse fedResponse) {
         this.subject = subject;
         this.principal = principal;
         this.roles = roles;

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserPrincipal.java
----------------------------------------------------------------------
diff --git a/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserPrincipal.java b/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserPrincipal.java
index 89ea304..917f03d 100644
--- a/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserPrincipal.java
+++ b/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserPrincipal.java
@@ -20,17 +20,17 @@
 package org.apache.cxf.fediz.jetty;
 
 import org.w3c.dom.Element;
-
 import org.apache.cxf.fediz.core.ClaimCollection;
 import org.apache.cxf.fediz.core.FederationPrincipal;
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 
+@SuppressWarnings("deprecation")
 public class FederationUserPrincipal implements FederationPrincipal {
     private String name;
     private ClaimCollection claims;
-    private FederationResponse response;
+    private FedizResponse response;
 
-    public FederationUserPrincipal(String name, FederationResponse response) {
+    public FederationUserPrincipal(String name, FedizResponse response) {
         this.name = name;
         this.response = response;
         this.claims = new ClaimCollection(response.getClaims());
@@ -49,7 +49,7 @@ public class FederationUserPrincipal implements FederationPrincipal {
     
     // not public available
     //[TODO] maybe find better approach, custom UserIdentity
-    FederationResponse getFederationResponse() {
+    FedizResponse getFedizResponse() {
         return response;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/FederationConfig.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/FederationConfig.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/FederationConfig.java
index 255e8fb..9707536 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/FederationConfig.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/FederationConfig.java
@@ -20,13 +20,14 @@
 package org.apache.cxf.fediz.spring;
 
 import java.util.List;
-import org.apache.cxf.fediz.core.config.FederationContext;
+
+import org.apache.cxf.fediz.core.config.FedizContext;
 
 public interface FederationConfig {
 
-    List<FederationContext> getFederationContextList();
+    List<FedizContext> getFedizContextList();
     
-    FederationContext getFederationContext(String contextName);
+    FedizContext getFedizContext(String contextName);
     
-    FederationContext getFederationContext();
+    FedizContext getFedizContext();
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/FederationConfigImpl.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/FederationConfigImpl.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/FederationConfigImpl.java
index 4324103..0deaaca 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/FederationConfigImpl.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/FederationConfigImpl.java
@@ -23,12 +23,10 @@ import java.util.List;
 
 import javax.servlet.ServletContext;
 
-import org.apache.cxf.fediz.core.config.FederationConfigurator;
-import org.apache.cxf.fediz.core.config.FederationContext;
-
+import org.apache.cxf.fediz.core.config.FedizConfigurator;
+import org.apache.cxf.fediz.core.config.FedizContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
 import org.springframework.beans.factory.BeanCreationException;
 import org.springframework.core.io.Resource;
 import org.springframework.util.Assert;
@@ -42,7 +40,7 @@ public class FederationConfigImpl implements FederationConfig, ServletContextAwa
     private String contextName;
     
     private ServletContext servletContext;
-    private FederationConfigurator configurator = new FederationConfigurator();
+    private FedizConfigurator configurator = new FedizConfigurator();
     
     
     public Resource getConfigFile() {
@@ -72,13 +70,13 @@ public class FederationConfigImpl implements FederationConfig, ServletContextAwa
     }
 
     @Override
-    public List<FederationContext> getFederationContextList() {
-        return configurator.getFederationContextList();
+    public List<FedizContext> getFedizContextList() {
+        return configurator.getFedizContextList();
     }
 
     @Override
-    public FederationContext getFederationContext(String context) {
-        FederationContext ctx = configurator.getFederationContext(context);
+    public FedizContext getFedizContext(String context) {
+        FedizContext ctx = configurator.getFedizContext(context);
         if (ctx == null) {
             LOG.error("Federation context '" + context + "' not found.");
             throw new IllegalStateException("Federation context '" + context + "' not found.");
@@ -87,14 +85,14 @@ public class FederationConfigImpl implements FederationConfig, ServletContextAwa
     }
 
     @Override
-    public FederationContext getFederationContext() {
+    public FedizContext getFedizContext() {
         if (servletContext != null) {
             LOG.debug("Reading federation configuration for context '{}'",
                       servletContext.getContextPath());
-            return getFederationContext(servletContext.getContextPath());
+            return getFedizContext(servletContext.getContextPath());
         } else {
             Assert.notNull(contextName, "Property 'contextName' must be configured because ServletContext null");
-            return getFederationContext(contextName);
+            return getFedizContext(contextName);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/AbstractFederationUserDetailsService.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/AbstractFederationUserDetailsService.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/AbstractFederationUserDetailsService.java
index d182268..82444c6 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/AbstractFederationUserDetailsService.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/AbstractFederationUserDetailsService.java
@@ -18,7 +18,7 @@
  */
 package org.apache.cxf.fediz.spring.authentication;
 
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.springframework.security.core.userdetails.AuthenticationUserDetailsService;
 import org.springframework.security.core.userdetails.UserDetails;
 
@@ -34,9 +34,9 @@ public abstract class AbstractFederationUserDetailsService
 
     /**
      * Protected template method for construct a {@link org.springframework.security.core.userdetails.UserDetails} 
-     * via the supplied FederationResponse
+     * via the supplied FedizResponse
      *
      * @return the newly created UserDetails object.
      */
-    protected abstract UserDetails loadUserDetails(FederationResponse response);
+    protected abstract UserDetails loadUserDetails(FedizResponse response);
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
index 778348b..a5a1390 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
@@ -19,16 +19,14 @@
 
 package org.apache.cxf.fediz.spring.authentication;
 
-import org.apache.cxf.fediz.core.FederationProcessor;
-import org.apache.cxf.fediz.core.FederationProcessorImpl;
-import org.apache.cxf.fediz.core.FederationRequest;
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FederationProcessorImpl;
+import org.apache.cxf.fediz.core.processor.FedizProcessor;
+import org.apache.cxf.fediz.core.processor.FedizRequest;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.apache.cxf.fediz.spring.FederationConfig;
 import org.apache.cxf.fediz.spring.SpringFedizMessageSource;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.context.MessageSource;
 import org.springframework.context.MessageSourceAware;
@@ -116,9 +114,9 @@ public class FederationAuthenticationProvider implements AuthenticationProvider,
     private FederationAuthenticationToken authenticateNow(final Authentication authentication)
         throws AuthenticationException {
         try {
-            FederationRequest wfReq = (FederationRequest)authentication.getCredentials();
-            FederationProcessor wfProc = new FederationProcessorImpl();
-            FederationResponse wfRes = wfProc.processRequest(wfReq, federationConfig.getFederationContext());
+            FedizRequest wfReq = (FedizRequest)authentication.getCredentials();
+            FedizProcessor wfProc = new FederationProcessorImpl();
+            FedizResponse wfRes = wfProc.processRequest(wfReq, federationConfig.getFedizContext());
 
             final UserDetails userDetails = loadUserByFederationResponse(wfRes);
             userDetailsChecker.check(userDetails);
@@ -136,7 +134,7 @@ public class FederationAuthenticationProvider implements AuthenticationProvider,
      * @param response The WS Federation response
      * @return the UserDetails.
      */
-    protected UserDetails loadUserByFederationResponse(final FederationResponse response) {
+    protected UserDetails loadUserByFederationResponse(final FedizResponse response) {
         final FederationResponseAuthenticationToken token = new FederationResponseAuthenticationToken(response);
         return this.authenticationUserDetailsService.loadUserDetails(token);
     }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationToken.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationToken.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationToken.java
index c996131..77983ea 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationToken.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationToken.java
@@ -23,10 +23,9 @@ import java.io.Serializable;
 import java.util.Collection;
 
 import org.w3c.dom.Element;
-
 import org.apache.cxf.fediz.core.ClaimCollection;
 import org.apache.cxf.fediz.core.FederationPrincipal;
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.springframework.security.authentication.AbstractAuthenticationToken;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.SpringSecurityCoreVersion;
@@ -35,6 +34,7 @@ import org.springframework.security.core.userdetails.UserDetails;
 /**
  * Represents a successful WS-Federation based authentication.
  */
+@SuppressWarnings("deprecation")
 public class FederationAuthenticationToken extends AbstractAuthenticationToken
     implements Serializable, FederationPrincipal {
 
@@ -43,12 +43,12 @@ public class FederationAuthenticationToken extends AbstractAuthenticationToken
     private final Object credentials;
     private final Object principal;
     private final UserDetails userDetails;
-    private final FederationResponse response;
+    private final FedizResponse response;
 
     
     public FederationAuthenticationToken(final Object principal, final Object credentials,
         final Collection<? extends GrantedAuthority> authorities, final UserDetails userDetails,
-        final FederationResponse response) {
+        final FedizResponse response) {
         super(authorities);
 
         if ((principal == null) || "".equals(principal) || (credentials == null)
@@ -71,7 +71,7 @@ public class FederationAuthenticationToken extends AbstractAuthenticationToken
         return this.principal;
     }
 
-    public FederationResponse getResponse() {
+    public FedizResponse getResponse() {
         return this.response;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationResponseAuthenticationToken.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationResponseAuthenticationToken.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationResponseAuthenticationToken.java
index 307665b..138a9ed 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationResponseAuthenticationToken.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationResponseAuthenticationToken.java
@@ -21,7 +21,7 @@ package org.apache.cxf.fediz.spring.authentication;
 
 import java.util.ArrayList;
 
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.springframework.security.authentication.AbstractAuthenticationToken;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.SpringSecurityCoreVersion;
@@ -30,10 +30,10 @@ public final class FederationResponseAuthenticationToken extends AbstractAuthent
 
     private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
 
-    private final FederationResponse response;
+    private final FedizResponse response;
 
 
-    public FederationResponseAuthenticationToken(final FederationResponse response) {
+    public FederationResponseAuthenticationToken(final FedizResponse response) {
         super(new ArrayList<GrantedAuthority>());
 
         this.response = response;
@@ -47,7 +47,7 @@ public final class FederationResponseAuthenticationToken extends AbstractAuthent
         return this.response;
     }
     
-    public FederationResponse getResponse() {
+    public FedizResponse getResponse() {
         return this.response;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/GrantedAuthoritiesUserDetailsFederationService.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/GrantedAuthoritiesUserDetailsFederationService.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/GrantedAuthoritiesUserDetailsFederationService.java
index 9d52c01..cbe270e 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/GrantedAuthoritiesUserDetailsFederationService.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/GrantedAuthoritiesUserDetailsFederationService.java
@@ -21,7 +21,7 @@ package org.apache.cxf.fediz.spring.authentication;
 import java.util.*;
 
 import org.apache.cxf.fediz.core.ClaimCollection;
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.apache.cxf.fediz.spring.FederationUser;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.authority.SimpleGrantedAuthority;
@@ -37,7 +37,7 @@ public class GrantedAuthoritiesUserDetailsFederationService
     private boolean convertToUpperCase = true;
     
     @Override
-    protected UserDetails loadUserDetails(FederationResponse response) {
+    protected UserDetails loadUserDetails(FedizResponse response) {
         
         final List<GrantedAuthority> grantedAuthorities = new ArrayList<GrantedAuthority>();
         

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/preauth/FederationPreAuthenticatedProcessingFilter.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/preauth/FederationPreAuthenticatedProcessingFilter.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/preauth/FederationPreAuthenticatedProcessingFilter.java
index 9f6a482..ddd0d83 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/preauth/FederationPreAuthenticatedProcessingFilter.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/preauth/FederationPreAuthenticatedProcessingFilter.java
@@ -21,7 +21,7 @@ package org.apache.cxf.fediz.spring.preauth;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.cxf.fediz.core.FederationPrincipal;
+import org.apache.cxf.fediz.core.FedizPrincipal;
 import org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter;
 
 /**
@@ -53,7 +53,7 @@ public class FederationPreAuthenticatedProcessingFilter extends AbstractPreAuthe
      */
     protected Object getPreAuthenticatedCredentials(HttpServletRequest httpRequest) {
         Object principal = httpRequest.getUserPrincipal() == null ? null : httpRequest.getUserPrincipal();
-        if (principal instanceof FederationPrincipal) {
+        if (principal instanceof FedizPrincipal) {
             Object obj = httpRequest.getSession(false).getAttribute(SECURITY_TOKEN_ATTR);
             if (obj != null)  {
                 return obj;
@@ -62,8 +62,8 @@ public class FederationPreAuthenticatedProcessingFilter extends AbstractPreAuthe
                 throw new IllegalStateException("Session must contain Federation response");
             }
         } else {
-            logger.error("Principal must be instance of FederationPrincipal: " + principal.toString());
-            throw new IllegalStateException("Principal must be instance of FederationPrincipal");
+            logger.error("Principal must be instance of FedizPrincipal: " + principal.toString());
+            throw new IllegalStateException("Principal must be instance of FedizPrincipal");
         }
         //return "N/A";
     }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/preauth/PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/preauth/PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/preauth/PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService.java
index 23617b4..f74bc28 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/preauth/PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/preauth/PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService.java
@@ -21,7 +21,7 @@ package org.apache.cxf.fediz.spring.preauth;
 import java.util.*;
 
 import org.apache.cxf.fediz.core.ClaimCollection;
-import org.apache.cxf.fediz.core.FederationPrincipal;
+import org.apache.cxf.fediz.core.FedizPrincipal;
 import org.apache.cxf.fediz.spring.FederationUser;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.AuthenticationException;
@@ -60,11 +60,11 @@ public class PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService
     public final UserDetails loadUserDetails(PreAuthenticatedAuthenticationToken token) throws AuthenticationException {
         Assert.notNull(token.getDetails());
         Assert.isInstanceOf(GrantedAuthoritiesContainer.class, token.getDetails());
-        Assert.isInstanceOf(FederationPrincipal.class, token.getPrincipal());
+        Assert.isInstanceOf(FedizPrincipal.class, token.getPrincipal());
         Collection<? extends GrantedAuthority> authorities = 
             ((GrantedAuthoritiesContainer) token.getDetails()).getGrantedAuthorities();
         
-        return createuserDetails(token, authorities, ((FederationPrincipal)token.getPrincipal()).getClaims());
+        return createuserDetails(token, authorities, ((FedizPrincipal)token.getPrincipal()).getClaims());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
index 2696845..096ec5a 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
@@ -25,15 +25,13 @@ import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.cxf.fediz.core.FederationProcessor;
-import org.apache.cxf.fediz.core.FederationProcessorImpl;
-import org.apache.cxf.fediz.core.config.FederationContext;
+import org.apache.cxf.fediz.core.config.FedizContext;
 import org.apache.cxf.fediz.core.exception.ProcessingException;
+import org.apache.cxf.fediz.core.processor.FederationProcessorImpl;
+import org.apache.cxf.fediz.core.processor.FedizProcessor;
 import org.apache.cxf.fediz.spring.FederationConfig;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.context.ApplicationContext;
@@ -75,10 +73,10 @@ public class FederationAuthenticationEntryPoint implements AuthenticationEntryPo
             final AuthenticationException authenticationException) throws IOException, ServletException {
 
         String redirectUrl = null;
-        FederationContext fedContext = federationConfig.getFederationContext();
+        FedizContext fedContext = federationConfig.getFedizContext();
         LOG.debug("Federation context: {}", fedContext);
         try {
-            FederationProcessor wfProc = new FederationProcessorImpl();
+            FedizProcessor wfProc = new FederationProcessorImpl();
             redirectUrl = wfProc.createSignInRequest(servletRequest, fedContext);
             if (redirectUrl == null) {
                 LOG.warn("Failed to create SignInRequest. Redirect URL null");

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
index 59bcb87..c47377a 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
@@ -25,7 +25,7 @@ import java.security.cert.X509Certificate;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.cxf.fediz.core.FederationRequest;
+import org.apache.cxf.fediz.core.processor.FedizRequest;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.AuthenticationException;
@@ -47,7 +47,7 @@ public class FederationAuthenticationFilter extends AbstractAuthenticationProces
         
         String wa = request.getParameter("wa");
         String wresult = request.getParameter("wresult");
-        FederationRequest wfReq = new FederationRequest();
+        FedizRequest wfReq = new FedizRequest();
         wfReq.setWa(wa);
         wfReq.setWresult(wresult);
         

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutFilter.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutFilter.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutFilter.java
index 63c9a2d..2e02460 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutFilter.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutFilter.java
@@ -48,7 +48,7 @@ public class FederationLogoutFilter extends LogoutFilter {
             if (contextName == null || contextName.isEmpty()) {
                 contextName = "/";
             }
-            this.logoutUrl = federationConfig.getFederationContext(contextName).getLogoutURL();
+            this.logoutUrl = federationConfig.getFedizContext(contextName).getLogoutURL();
         }
         if (this.logoutUrl != null && !this.logoutUrl.isEmpty()) {
             super.setFilterProcessesUrl(this.logoutUrl);

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutSuccessHandler.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutSuccessHandler.java b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutSuccessHandler.java
index 180a436..5ef4b6d 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutSuccessHandler.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutSuccessHandler.java
@@ -19,14 +19,15 @@
 package org.apache.cxf.fediz.spring.web;
 
 import java.io.IOException;
+
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.cxf.fediz.core.FederationProcessor;
-import org.apache.cxf.fediz.core.FederationProcessorImpl;
-import org.apache.cxf.fediz.core.config.FederationContext;
+import org.apache.cxf.fediz.core.config.FedizContext;
 import org.apache.cxf.fediz.core.exception.ProcessingException;
+import org.apache.cxf.fediz.core.processor.FederationProcessorImpl;
+import org.apache.cxf.fediz.core.processor.FedizProcessor;
 import org.apache.cxf.fediz.spring.FederationConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -48,12 +49,12 @@ public class FederationLogoutSuccessHandler implements LogoutSuccessHandler {
     @Override
     public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response,
                                 Authentication authentication) throws IOException, ServletException {
-        FederationProcessor processor = new FederationProcessorImpl();
+        FedizProcessor processor = new FederationProcessorImpl();
         String contextName = request.getContextPath();
         if (contextName == null || contextName.isEmpty()) {
             contextName = "/";
         }
-        FederationContext fedCtx = federationConfig.getFederationContext(contextName);
+        FedizContext fedCtx = federationConfig.getFedizContext(contextName);
         String redirectURL;
         try {
             redirectURL = processor.createSignOutRequest(request, fedCtx);

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfig.java
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfig.java b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfig.java
index 255e8fb..9707536 100644
--- a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfig.java
+++ b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfig.java
@@ -20,13 +20,14 @@
 package org.apache.cxf.fediz.spring;
 
 import java.util.List;
-import org.apache.cxf.fediz.core.config.FederationContext;
+
+import org.apache.cxf.fediz.core.config.FedizContext;
 
 public interface FederationConfig {
 
-    List<FederationContext> getFederationContextList();
+    List<FedizContext> getFedizContextList();
     
-    FederationContext getFederationContext(String contextName);
+    FedizContext getFedizContext(String contextName);
     
-    FederationContext getFederationContext();
+    FedizContext getFedizContext();
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfigImpl.java
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfigImpl.java b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfigImpl.java
index 95b8998..80b27e9 100644
--- a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfigImpl.java
+++ b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfigImpl.java
@@ -21,12 +21,10 @@ package org.apache.cxf.fediz.spring;
 
 import java.util.List;
 
-import org.apache.cxf.fediz.core.config.FederationConfigurator;
-import org.apache.cxf.fediz.core.config.FederationContext;
-
+import org.apache.cxf.fediz.core.config.FedizConfigurator;
+import org.apache.cxf.fediz.core.config.FedizContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
 import org.springframework.beans.factory.BeanCreationException;
 import org.springframework.core.io.Resource;
 import org.springframework.util.Assert;
@@ -41,7 +39,7 @@ public class FederationConfigImpl implements FederationConfig {
     private String contextName;
     
     //private ServletContext servletContext;
-    private FederationConfigurator configurator = new FederationConfigurator();
+    private FedizConfigurator configurator = new FedizConfigurator();
     
     
     public Resource getConfigFile() {
@@ -71,13 +69,13 @@ public class FederationConfigImpl implements FederationConfig {
     }
 
     @Override
-    public List<FederationContext> getFederationContextList() {
-        return configurator.getFederationContextList();
+    public List<FedizContext> getFedizContextList() {
+        return configurator.getFedizContextList();
     }
 
     @Override
-    public FederationContext getFederationContext(String context) {
-        FederationContext ctx = configurator.getFederationContext(context);
+    public FedizContext getFedizContext(String context) {
+        FedizContext ctx = configurator.getFedizContext(context);
         if (ctx == null) {
             LOG.error("Federation context '" + context + "' not found.");
             throw new IllegalStateException("Federation context '" + context + "' not found.");
@@ -87,13 +85,13 @@ public class FederationConfigImpl implements FederationConfig {
 
     
     @Override
-    public FederationContext getFederationContext() {
+    public FedizContext getFedizContext() {
         if (contextName != null) {
             LOG.debug("Reading federation configuration for context '{}'", contextName);
-            return getFederationContext(contextName);
+            return getFedizContext(contextName);
         } else {
             Assert.notNull(contextName, "Property 'contextName' must be configured because ServletContext null");
-            return getFederationContext(contextName);
+            return getFedizContext(contextName);
         }
     }
     

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/AbstractFederationUserDetailsService.java
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/AbstractFederationUserDetailsService.java b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/AbstractFederationUserDetailsService.java
index 9ef97eb..c34de45 100644
--- a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/AbstractFederationUserDetailsService.java
+++ b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/AbstractFederationUserDetailsService.java
@@ -18,7 +18,7 @@
  */
 package org.apache.cxf.fediz.spring.authentication;
 
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.springframework.security.Authentication;
 import org.springframework.security.userdetails.AuthenticationUserDetailsService;
 import org.springframework.security.userdetails.UserDetails;
@@ -45,11 +45,11 @@ public abstract class AbstractFederationUserDetailsService
 
     /**
      * Protected template method for construct a {@link org.springframework.security.core.userdetails.UserDetails} 
-     * via the supplied FederationResponse
+     * via the supplied FedizResponse
      *
      * @return the newly created UserDetails object.
      */
-    protected abstract UserDetails loadUserDetails(FederationResponse response);
+    protected abstract UserDetails loadUserDetails(FedizResponse response);
 
     
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
index 828c6d0..d58e210 100644
--- a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
+++ b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
@@ -19,22 +19,18 @@
 
 package org.apache.cxf.fediz.spring.authentication;
 
-import org.apache.cxf.fediz.core.FederationProcessor;
-import org.apache.cxf.fediz.core.FederationProcessorImpl;
-import org.apache.cxf.fediz.core.FederationRequest;
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FederationProcessorImpl;
+import org.apache.cxf.fediz.core.processor.FedizProcessor;
+import org.apache.cxf.fediz.core.processor.FedizRequest;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.apache.cxf.fediz.spring.FederationConfig;
 import org.apache.cxf.fediz.spring.SpringFedizMessageSource;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.context.MessageSource;
 import org.springframework.context.MessageSourceAware;
 import org.springframework.context.support.MessageSourceAccessor;
-
-
 import org.springframework.security.Authentication;
 import org.springframework.security.AuthenticationException;
 import org.springframework.security.BadCredentialsException;
@@ -117,9 +113,9 @@ public class FederationAuthenticationProvider implements AuthenticationProvider,
     private FederationAuthenticationToken authenticateNow(final Authentication authentication)
         throws AuthenticationException {
         try {
-            FederationRequest wfReq = (FederationRequest)authentication.getCredentials();
-            FederationProcessor wfProc = new FederationProcessorImpl();
-            FederationResponse wfRes = wfProc.processRequest(wfReq, federationConfig.getFederationContext());
+            FedizRequest wfReq = (FedizRequest)authentication.getCredentials();
+            FedizProcessor wfProc = new FederationProcessorImpl();
+            FedizResponse wfRes = wfProc.processRequest(wfReq, federationConfig.getFedizContext());
 
             final UserDetails userDetails = loadUserByFederationResponse(wfRes);
             userDetailsChecker.check(userDetails);
@@ -137,7 +133,7 @@ public class FederationAuthenticationProvider implements AuthenticationProvider,
      * @param response The WS Federation response
      * @return the UserDetails.
      */
-    protected UserDetails loadUserByFederationResponse(final FederationResponse response) {
+    protected UserDetails loadUserByFederationResponse(final FedizResponse response) {
         final FederationResponseAuthenticationToken token = new FederationResponseAuthenticationToken(response);
         return this.authenticationUserDetailsService.loadUserDetails(token);
     }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationToken.java
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationToken.java b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationToken.java
index 63bc962..8179167 100644
--- a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationToken.java
+++ b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationToken.java
@@ -22,10 +22,9 @@ package org.apache.cxf.fediz.spring.authentication;
 import java.io.Serializable;
 
 import org.w3c.dom.Element;
-
 import org.apache.cxf.fediz.core.ClaimCollection;
 import org.apache.cxf.fediz.core.FederationPrincipal;
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.springframework.security.GrantedAuthority;
 import org.springframework.security.providers.AbstractAuthenticationToken;
 import org.springframework.security.userdetails.UserDetails;
@@ -33,6 +32,7 @@ import org.springframework.security.userdetails.UserDetails;
 /**
  * Represents a successful WS-Federation based authentication.
  */
+@SuppressWarnings("deprecation")
 public class FederationAuthenticationToken extends AbstractAuthenticationToken
     implements Serializable, FederationPrincipal {
 
@@ -41,12 +41,12 @@ public class FederationAuthenticationToken extends AbstractAuthenticationToken
     private final Object credentials;
     private final Object principal;
     private final UserDetails userDetails;
-    private final FederationResponse response;
+    private final FedizResponse response;
 
     
     public FederationAuthenticationToken(final Object principal, final Object credentials,
         final GrantedAuthority[] authorities, final UserDetails userDetails,
-        final FederationResponse response) {
+        final FedizResponse response) {
         super(authorities);
 
         if ((principal == null) || "".equals(principal) || (credentials == null)
@@ -69,7 +69,7 @@ public class FederationAuthenticationToken extends AbstractAuthenticationToken
         return this.principal;
     }
 
-    public FederationResponse getResponse() {
+    public FedizResponse getResponse() {
         return this.response;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationResponseAuthenticationToken.java
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationResponseAuthenticationToken.java b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationResponseAuthenticationToken.java
index d3eb155..55d7a33 100644
--- a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationResponseAuthenticationToken.java
+++ b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationResponseAuthenticationToken.java
@@ -19,17 +19,17 @@
 
 package org.apache.cxf.fediz.spring.authentication;
 
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.springframework.security.providers.AbstractAuthenticationToken;
 
 public final class FederationResponseAuthenticationToken extends AbstractAuthenticationToken {
 
     private static final long serialVersionUID = 1L;
 
-    private final FederationResponse response;
+    private final FedizResponse response;
 
 
-    public FederationResponseAuthenticationToken(final FederationResponse response) {
+    public FederationResponseAuthenticationToken(final FedizResponse response) {
         super(null);
 
         this.response = response;
@@ -43,7 +43,7 @@ public final class FederationResponseAuthenticationToken extends AbstractAuthent
         return this.response;
     }
     
-    public FederationResponse getResponse() {
+    public FedizResponse getResponse() {
         return this.response;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/GrantedAuthoritiesUserDetailsFederationService.java
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/GrantedAuthoritiesUserDetailsFederationService.java b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/GrantedAuthoritiesUserDetailsFederationService.java
index 1864f10..15df380 100644
--- a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/GrantedAuthoritiesUserDetailsFederationService.java
+++ b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/GrantedAuthoritiesUserDetailsFederationService.java
@@ -21,7 +21,7 @@ package org.apache.cxf.fediz.spring.authentication;
 import java.util.*;
 
 import org.apache.cxf.fediz.core.ClaimCollection;
-import org.apache.cxf.fediz.core.FederationResponse;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.apache.cxf.fediz.spring.FederationUser;
 import org.springframework.security.GrantedAuthority;
 import org.springframework.security.GrantedAuthorityImpl;
@@ -37,7 +37,7 @@ public class GrantedAuthoritiesUserDetailsFederationService
     private boolean convertToUpperCase = true;
     
     @Override
-    protected UserDetails loadUserDetails(FederationResponse response) {
+    protected UserDetails loadUserDetails(FedizResponse response) {
         
         List<GrantedAuthority> grantedAuthorities = new ArrayList<GrantedAuthority>();
         

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/FederationPreAuthenticatedProcessingFilter.java
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/FederationPreAuthenticatedProcessingFilter.java b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/FederationPreAuthenticatedProcessingFilter.java
index d4f0b7d..7aae276 100644
--- a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/FederationPreAuthenticatedProcessingFilter.java
+++ b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/FederationPreAuthenticatedProcessingFilter.java
@@ -21,7 +21,7 @@ package org.apache.cxf.fediz.spring.preauth;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.cxf.fediz.core.FederationPrincipal;
+import org.apache.cxf.fediz.core.FedizPrincipal;
 import org.springframework.security.ui.FilterChainOrder;
 import org.springframework.security.ui.preauth.AbstractPreAuthenticatedProcessingFilter;
 
@@ -54,7 +54,7 @@ public class FederationPreAuthenticatedProcessingFilter extends AbstractPreAuthe
      */
     protected Object getPreAuthenticatedCredentials(HttpServletRequest httpRequest) {
         Object principal = httpRequest.getUserPrincipal() == null ? null : httpRequest.getUserPrincipal();
-        if (principal instanceof FederationPrincipal) {
+        if (principal instanceof FedizPrincipal) {
             Object obj = httpRequest.getSession(false).getAttribute(SECURITY_TOKEN_ATTR);
             if (obj != null)  {
                 return obj;
@@ -63,8 +63,8 @@ public class FederationPreAuthenticatedProcessingFilter extends AbstractPreAuthe
                 throw new IllegalStateException("Session must contain Federation response");
             }
         } else {
-            logger.error("Principal must be instance of FederationPrincipal: " + principal.toString());
-            throw new IllegalStateException("Principal must be instance of FederationPrincipal");
+            logger.error("Principal must be instance of FedizPrincipal: " + principal.toString());
+            throw new IllegalStateException("Principal must be instance of FedizPrincipal");
         }
         //return "N/A";
     }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService.java
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService.java b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService.java
index 97224b0..e10831b 100644
--- a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService.java
+++ b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService.java
@@ -18,10 +18,8 @@
  */
 package org.apache.cxf.fediz.spring.preauth;
 
-import java.util.*;
-
 import org.apache.cxf.fediz.core.ClaimCollection;
-import org.apache.cxf.fediz.core.FederationPrincipal;
+import org.apache.cxf.fediz.core.FedizPrincipal;
 import org.apache.cxf.fediz.spring.FederationUser;
 import org.springframework.security.Authentication;
 import org.springframework.security.AuthenticationException;
@@ -61,11 +59,11 @@ public class PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService
     public final UserDetails loadUserDetails(PreAuthenticatedAuthenticationToken token) throws AuthenticationException {
         Assert.notNull(token.getDetails());
         Assert.isInstanceOf(GrantedAuthoritiesContainer.class, token.getDetails());
-        Assert.isInstanceOf(FederationPrincipal.class, token.getPrincipal());
+        Assert.isInstanceOf(FedizPrincipal.class, token.getPrincipal());
         GrantedAuthority[] authorities = 
             ((GrantedAuthoritiesContainer) token.getDetails()).getGrantedAuthorities();
         
-        return createuserDetails(token, authorities, ((FederationPrincipal)token.getPrincipal()).getClaims());
+        return createuserDetails(token, authorities, ((FedizPrincipal)token.getPrincipal()).getClaims());
     }
 
     /**
@@ -84,10 +82,10 @@ public class PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService
         Assert.notNull(token.getDetails());
         Assert.isInstanceOf(PreAuthenticatedAuthenticationToken.class, token);
         Assert.isInstanceOf(GrantedAuthoritiesContainer.class, token.getDetails());
-        Assert.isInstanceOf(FederationPrincipal.class, token.getPrincipal());
+        Assert.isInstanceOf(FedizPrincipal.class, token.getPrincipal());
         GrantedAuthority[] authorities = 
             ((GrantedAuthoritiesContainer) token.getDetails()).getGrantedAuthorities();
         
-        return createuserDetails(token, authorities, ((FederationPrincipal)token.getPrincipal()).getClaims());
+        return createuserDetails(token, authorities, ((FedizPrincipal)token.getPrincipal()).getClaims());
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
index a8a6184..c6e2a02 100644
--- a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
+++ b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
@@ -27,15 +27,13 @@ import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.cxf.fediz.core.FederationProcessor;
-import org.apache.cxf.fediz.core.FederationProcessorImpl;
-import org.apache.cxf.fediz.core.config.FederationContext;
+import org.apache.cxf.fediz.core.config.FedizContext;
 import org.apache.cxf.fediz.core.exception.ProcessingException;
+import org.apache.cxf.fediz.core.processor.FederationProcessorImpl;
+import org.apache.cxf.fediz.core.processor.FedizProcessor;
 import org.apache.cxf.fediz.spring.FederationConfig;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.context.ApplicationContext;
@@ -78,10 +76,10 @@ public class FederationAuthenticationEntryPoint implements AuthenticationEntryPo
             final AuthenticationException authenticationException) throws IOException, ServletException {
 
         String redirectUrl = null;
-        FederationContext fedContext = federationConfig.getFederationContext();
+        FedizContext fedContext = federationConfig.getFedizContext();
         LOG.debug("Federation context: {}", fedContext);
         try {
-            FederationProcessor wfProc = new FederationProcessorImpl();
+            FedizProcessor wfProc = new FederationProcessorImpl();
             redirectUrl = wfProc.createSignInRequest(servletRequest, fedContext);
             if (redirectUrl == null) {
                 LOG.warn("Failed to create SignInRequest. Redirect URL null");
@@ -122,10 +120,10 @@ public class FederationAuthenticationEntryPoint implements AuthenticationEntryPo
         HttpServletRequest hrequest = (HttpServletRequest)request;
         HttpServletResponse hresponse = (HttpServletResponse)response;
         String redirectUrl = null;
-        FederationContext fedContext = federationConfig.getFederationContext();
+        FedizContext fedContext = federationConfig.getFedizContext();
         LOG.debug("Federation context: {}", fedContext);
         try {
-            FederationProcessor wfProc = new FederationProcessorImpl();
+            FedizProcessor wfProc = new FederationProcessorImpl();
             redirectUrl = wfProc.createSignInRequest(hrequest, fedContext);
             if (redirectUrl == null) {
                 LOG.warn("Failed to create SignInRequest.");

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
index ef1bbf8..c46cac3 100644
--- a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
+++ b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
@@ -24,8 +24,7 @@ import java.security.cert.X509Certificate;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.cxf.fediz.core.FederationRequest;
-
+import org.apache.cxf.fediz.core.processor.FedizRequest;
 import org.springframework.security.Authentication;
 import org.springframework.security.AuthenticationException;
 import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
@@ -61,7 +60,7 @@ public class FederationAuthenticationFilter extends AbstractProcessingFilter {
     public Authentication attemptAuthentication(HttpServletRequest request) throws AuthenticationException {
         String wa = request.getParameter("wa");
         String wresult = request.getParameter("wresult");
-        FederationRequest wfReq = new FederationRequest();
+        FedizRequest wfReq = new FedizRequest();
         wfReq.setWa(wa);
         wfReq.setWresult(wresult);
         

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
----------------------------------------------------------------------
diff --git a/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java b/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
index d9d2ece..83a4630 100644
--- a/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
+++ b/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
@@ -36,7 +36,6 @@ import javax.servlet.http.HttpSession;
 import javax.xml.bind.JAXBException;
 
 import org.w3c.dom.Document;
-
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Session;
 import org.apache.catalina.authenticator.Constants;
@@ -46,13 +45,13 @@ import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
 import org.apache.catalina.deploy.LoginConfig;
 import org.apache.cxf.fediz.core.FederationConstants;
-import org.apache.cxf.fediz.core.FederationProcessor;
-import org.apache.cxf.fediz.core.FederationProcessorImpl;
-import org.apache.cxf.fediz.core.FederationRequest;
-import org.apache.cxf.fediz.core.FederationResponse;
-import org.apache.cxf.fediz.core.config.FederationConfigurator;
-import org.apache.cxf.fediz.core.config.FederationContext;
+import org.apache.cxf.fediz.core.config.FedizConfigurator;
+import org.apache.cxf.fediz.core.config.FedizContext;
 import org.apache.cxf.fediz.core.exception.ProcessingException;
+import org.apache.cxf.fediz.core.processor.FedizProcessor;
+import org.apache.cxf.fediz.core.processor.FedizProcessorFactory;
+import org.apache.cxf.fediz.core.processor.FedizRequest;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.wss4j.common.util.DOM2Writer;
@@ -78,7 +77,7 @@ public class FederationAuthenticator extends FormAuthenticator {
     protected boolean tokenExpirationValidation = true;
     protected String encoding = "UTF-8";
 
-    private FederationConfigurator configurator;
+    private FedizConfigurator configurator;
 
     public FederationAuthenticator() {
         LOG.debug("WsFedAuthenticator()");
@@ -127,7 +126,7 @@ public class FederationAuthenticator extends FormAuthenticator {
                     f = new File(catalinaBase.concat(File.separator + getConfigFile()));
                 }
             }
-            configurator = new FederationConfigurator();
+            configurator = new FedizConfigurator();
             configurator.loadConfig(f);
             LOG.debug("Fediz configuration read from " + f.getAbsolutePath());
         } catch (JAXBException e) {
@@ -141,9 +140,9 @@ public class FederationAuthenticator extends FormAuthenticator {
     @Override
     protected synchronized void stopInternal() throws LifecycleException {
         if (configurator != null) {
-            List<FederationContext> fedContextList = configurator.getFederationContextList();
+            List<FedizContext> fedContextList = configurator.getFedizContextList();
             if (fedContextList != null) {
-                for (FederationContext fedContext : fedContextList) {
+                for (FedizContext fedContext : fedContextList) {
                     try {
                         fedContext.close();
                     } catch (IOException ex) {
@@ -155,11 +154,11 @@ public class FederationAuthenticator extends FormAuthenticator {
         super.stopInternal();
     }
 
-    protected FederationContext getContextConfiguration(String contextName) {
+    protected FedizContext getContextConfiguration(String contextName) {
         if (configurator == null) {
             throw new IllegalStateException("No Fediz configuration available");
         }
-        FederationContext config = configurator.getFederationContext(contextName);
+        FedizContext config = configurator.getFedizContext(contextName);
         if (config == null) {
             throw new IllegalStateException("No Fediz configuration for context :" + contextName);
         }
@@ -188,8 +187,9 @@ public class FederationAuthenticator extends FormAuthenticator {
             if (contextName == null || contextName.isEmpty()) {
                 contextName = "/";
             }
-            FederationContext fedConfig = getContextConfiguration(contextName);
-            FederationProcessor wfProc = new FederationProcessorImpl();
+            FedizContext fedConfig = getContextConfiguration(contextName);
+            FedizProcessor wfProc = 
+                FedizProcessorFactory.newFedizProcessor(fedConfig.getProtocol());
             try {
                 Document metadata = wfProc.getMetaData(fedConfig);
                 out.write(DOM2Writer.nodeToString(metadata));
@@ -206,7 +206,7 @@ public class FederationAuthenticator extends FormAuthenticator {
         if (contextName == null || contextName.isEmpty()) {
             contextName = "/";
         }
-        FederationContext fedConfig = getContextConfiguration(contextName);
+        FedizContext fedConfig = getContextConfiguration(contextName);
 
         String logoutUrl = fedConfig.getLogoutURL();
         if (logoutUrl != null && !logoutUrl.isEmpty()) {
@@ -215,7 +215,8 @@ public class FederationAuthenticator extends FormAuthenticator {
             if (httpSession != null && uri.equals(contextName + logoutUrl)) {
                 httpSession.invalidate();
 
-                FederationProcessor wfProc = new FederationProcessorImpl();
+                FedizProcessor wfProc = 
+                    FedizProcessorFactory.newFedizProcessor(fedConfig.getProtocol());
                 signOutRedirectToIssuer(request, response, wfProc);
 
                 return;
@@ -279,7 +280,7 @@ public class FederationAuthenticator extends FormAuthenticator {
             if (session == null) {
                 LOG.debug("Session should not be null after authentication");
             } else {
-                FederationResponse wfRes = (FederationResponse)session.getNote(FEDERATION_NOTE);
+                FedizResponse wfRes = (FedizResponse)session.getNote(FEDERATION_NOTE);
 
                 Date tokenExpires = wfRes.getTokenExpires();
                 if (tokenExpires == null) {
@@ -312,7 +313,14 @@ public class FederationAuthenticator extends FormAuthenticator {
                                 sm.getString("authenticator.requestBodyTooBig"));
                         return false;
                     }
-                    FederationProcessor wfProc = new FederationProcessorImpl();
+                    String contextName = request.getServletContext().getContextPath();
+                    if (contextName == null || contextName.isEmpty()) {
+                        contextName = "/";
+                    }
+                    FedizContext fedConfig = getContextConfiguration(contextName);
+                    
+                    FedizProcessor wfProc = 
+                        FedizProcessorFactory.newFedizProcessor(fedConfig.getProtocol());
                     signInRedirectToIssuer(request, response, wfProc);
 
                     return false;
@@ -371,7 +379,14 @@ public class FederationAuthenticator extends FormAuthenticator {
                         sm.getString("authenticator.requestBodyTooBig"));
                 return false;
             }
-            FederationProcessor wfProc = new FederationProcessorImpl();
+            String contextName = request.getServletContext().getContextPath();
+            if (contextName == null || contextName.isEmpty()) {
+                contextName = "/";
+            }
+            FedizContext fedConfig = getContextConfiguration(contextName);
+            
+            FedizProcessor wfProc = 
+                FedizProcessorFactory.newFedizProcessor(fedConfig.getProtocol());
             signInRedirectToIssuer(request, response, wfProc);
             return false;
         }
@@ -379,7 +394,7 @@ public class FederationAuthenticator extends FormAuthenticator {
         // Check whether it is the signin request, validate the token.
         // If failed, redirect to the error page if they are not correct
         String wresult = request.getParameter("wresult");
-        FederationResponse wfRes = null;
+        FedizResponse wfRes = null;
         if (wa.equals(FederationConstants.ACTION_SIGNIN)) {
             if (LOG.isDebugEnabled()) {
                 LOG.debug("SignIn request found");
@@ -400,7 +415,7 @@ public class FederationAuthenticator extends FormAuthenticator {
                     LOG.debug("wresult=\n" + wresult);
                 }
 
-                FederationRequest wfReq = new FederationRequest();
+                FedizRequest wfReq = new FedizRequest();
                 wfReq.setWa(wa);
                 wfReq.setWresult(wresult);
                 
@@ -412,9 +427,10 @@ public class FederationAuthenticator extends FormAuthenticator {
                 if (contextName == null || contextName.isEmpty()) {
                     contextName = "/";
                 }
-                FederationContext fedConfig = getContextConfiguration(contextName);
+                FedizContext fedConfig = getContextConfiguration(contextName);
 
-                FederationProcessor wfProc = new FederationProcessorImpl();
+                FedizProcessor wfProc = 
+                    FedizProcessorFactory.newFedizProcessor(fedConfig.getProtocol());
                 try {
                     wfRes = wfProc.processRequest(wfReq, fedConfig);
                 } catch (ProcessingException ex) {
@@ -569,14 +585,14 @@ public class FederationAuthenticator extends FormAuthenticator {
      *             {@link HttpServletResponse#sendError(int, String)} throws an
      *             {@link IOException}
      */
-    protected void signInRedirectToIssuer(Request request, HttpServletResponse response, FederationProcessor processor)
+    protected void signInRedirectToIssuer(Request request, HttpServletResponse response, FedizProcessor processor)
         throws IOException {
 
         String contextName = request.getServletContext().getContextPath();
         if (contextName == null || contextName.isEmpty()) {
             contextName = "/";
         }
-        FederationContext fedCtx = this.configurator.getFederationContext(contextName);
+        FedizContext fedCtx = this.configurator.getFedizContext(contextName);
         String redirectURL = null;
         try {
             redirectURL = processor.createSignInRequest(request, fedCtx);
@@ -595,14 +611,14 @@ public class FederationAuthenticator extends FormAuthenticator {
         
     }
 
-    protected void signOutRedirectToIssuer(Request request, HttpServletResponse response, FederationProcessor processor)
+    protected void signOutRedirectToIssuer(Request request, HttpServletResponse response, FedizProcessor processor)
             throws IOException {
 
         String contextName = request.getServletContext().getContextPath();
         if (contextName == null || contextName.isEmpty()) {
             contextName = "/";
         }
-        FederationContext fedCtx = this.configurator.getFederationContext(contextName);
+        FedizContext fedCtx = this.configurator.getFedizContext(contextName);
         String redirectURL = null;
         try {
             redirectURL = processor.createSignOutRequest(request, fedCtx);

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationPrincipalImpl.java
----------------------------------------------------------------------
diff --git a/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationPrincipalImpl.java b/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationPrincipalImpl.java
index ffafcbb..5739b19 100644
--- a/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationPrincipalImpl.java
+++ b/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationPrincipalImpl.java
@@ -22,12 +22,12 @@ package org.apache.cxf.fediz.tomcat;
 import java.util.List;
 
 import org.w3c.dom.Element;
-
 import org.apache.catalina.realm.GenericPrincipal;
 import org.apache.cxf.fediz.core.Claim;
 import org.apache.cxf.fediz.core.ClaimCollection;
 import org.apache.cxf.fediz.core.FederationPrincipal;
 
+@SuppressWarnings("deprecation")
 public class FederationPrincipalImpl extends GenericPrincipal implements FederationPrincipal {
 
     protected ClaimCollection claims;

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpWSFedProtocolHandler.java
----------------------------------------------------------------------
diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpWSFedProtocolHandler.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpWSFedProtocolHandler.java
index 3b909a8..43ebde0 100644
--- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpWSFedProtocolHandler.java
+++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpWSFedProtocolHandler.java
@@ -32,13 +32,8 @@ import java.util.Collections;
 import javax.servlet.http.HttpServletRequest;
 
 import org.w3c.dom.Element;
-
 import org.apache.cxf.fediz.core.FederationConstants;
-import org.apache.cxf.fediz.core.FederationProcessor;
-import org.apache.cxf.fediz.core.FederationProcessorImpl;
-import org.apache.cxf.fediz.core.FederationRequest;
-import org.apache.cxf.fediz.core.FederationResponse;
-import org.apache.cxf.fediz.core.config.FederationContext;
+import org.apache.cxf.fediz.core.config.FedizContext;
 import org.apache.cxf.fediz.core.config.TrustManager;
 import org.apache.cxf.fediz.core.config.jaxb.AudienceUris;
 import org.apache.cxf.fediz.core.config.jaxb.CertificateStores;
@@ -50,6 +45,10 @@ import org.apache.cxf.fediz.core.config.jaxb.TrustedIssuerType;
 import org.apache.cxf.fediz.core.config.jaxb.TrustedIssuers;
 import org.apache.cxf.fediz.core.config.jaxb.ValidationType;
 import org.apache.cxf.fediz.core.exception.ProcessingException;
+import org.apache.cxf.fediz.core.processor.FederationProcessorImpl;
+import org.apache.cxf.fediz.core.processor.FedizProcessor;
+import org.apache.cxf.fediz.core.processor.FedizRequest;
+import org.apache.cxf.fediz.core.processor.FedizResponse;
 import org.apache.cxf.fediz.service.idp.domain.Idp;
 import org.apache.cxf.fediz.service.idp.domain.TrustedIdp;
 import org.apache.cxf.fediz.service.idp.spi.TrustedIdpProtocolHandler;
@@ -59,10 +58,8 @@ import org.apache.wss4j.common.crypto.CertificateStore;
 import org.apache.xml.security.exceptions.Base64DecodingException;
 import org.apache.xml.security.stax.impl.util.IDGenerator;
 import org.apache.xml.security.utils.Base64;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
 import org.springframework.stereotype.Component;
 import org.springframework.webflow.execution.RequestContext;
 
@@ -138,14 +135,14 @@ public class TrustedIdpWSFedProtocolHandler implements TrustedIdpProtocolHandler
                 throw new IllegalStateException("No security token issued");
             }
     
-            FederationContext fedContext = getFederationContext(idp, trustedIdp);
+            FedizContext fedContext = getFedizContext(idp, trustedIdp);
     
-            FederationRequest wfReq = new FederationRequest();
+            FedizRequest wfReq = new FedizRequest();
             wfReq.setWa(FederationConstants.ACTION_SIGNIN);
             wfReq.setWresult(wresult);
     
-            FederationProcessor wfProc = new FederationProcessorImpl();
-            FederationResponse wfResp = wfProc.processRequest(wfReq, fedContext);
+            FedizProcessor wfProc = new FederationProcessorImpl();
+            FedizResponse wfResp = wfProc.processRequest(wfReq, fedContext);
     
             fedContext.close();
     
@@ -176,7 +173,7 @@ public class TrustedIdpWSFedProtocolHandler implements TrustedIdpProtocolHandler
     }
     
     
-    private FederationContext getFederationContext(Idp idpConfig,
+    private FedizContext getFedizContext(Idp idpConfig,
             TrustedIdp trustedIdpConfig) throws ProcessingException {
 
         ContextConfig config = new ContextConfig();
@@ -215,7 +212,7 @@ public class TrustedIdpWSFedProtocolHandler implements TrustedIdpProtocolHandler
         audienceUris.getAudienceItem().add(idpConfig.getRealm());
         config.setAudienceUris(audienceUris);
 
-        FederationContext fedContext = new FederationContext(config);
+        FedizContext fedContext = new FedizContext(config);
         if (!isCertificateLocation) {
             CertificateStore cs = null;
             

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/systests/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
----------------------------------------------------------------------
diff --git a/systests/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java b/systests/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
index 92f0f16..982dac4 100644
--- a/systests/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
+++ b/systests/simpleWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
@@ -34,7 +34,7 @@ import org.w3c.dom.Element;
 
 import org.apache.cxf.fediz.core.Claim;
 import org.apache.cxf.fediz.core.ClaimCollection;
-import org.apache.cxf.fediz.core.FederationPrincipal;
+import org.apache.cxf.fediz.core.FedizPrincipal;
 import org.apache.cxf.fediz.core.SecurityTokenThreadLocal;
 
 
@@ -68,8 +68,8 @@ public class FederationServlet extends HttpServlet {
             out.println("<p>role:" + item + "=" + ((request.isUserInRole(item)) ? "true" : "false") + "</p>");
         }
 
-        if (p instanceof FederationPrincipal) {
-            FederationPrincipal fp = (FederationPrincipal)p;
+        if (p instanceof FedizPrincipal) {
+            FedizPrincipal fp = (FedizPrincipal)p;
             
             ClaimCollection claims = fp.getClaims();
             for (Claim c: claims) {
@@ -78,7 +78,7 @@ public class FederationServlet extends HttpServlet {
             
             Element el = fp.getLoginToken();
             if (el != null) {
-                out.println("loginToken=FOUND{FederationPrincipal}<p>");
+                out.println("loginToken=FOUND{FedizPrincipal}<p>");
             }
             
             el = SecurityTokenThreadLocal.getToken();

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/systests/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
----------------------------------------------------------------------
diff --git a/systests/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java b/systests/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
index bb48236..5d90f9c 100644
--- a/systests/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
+++ b/systests/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
@@ -91,7 +91,7 @@ public class FederationServlet extends HttpServlet {
             
             Element el = fedToken.getLoginToken();
             if (el != null) {
-                out.println("loginToken=FOUND{FederationPrincipal}<p>");
+                out.println("loginToken=FOUND{FedizPrincipal}<p>");
             }
             
             el = SecurityTokenThreadLocal.getToken();

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/systests/springPreauthWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
----------------------------------------------------------------------
diff --git a/systests/springPreauthWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java b/systests/springPreauthWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
index dd25100..d23281c 100644
--- a/systests/springPreauthWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
+++ b/systests/springPreauthWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
@@ -34,7 +34,7 @@ import org.w3c.dom.Element;
 
 import org.apache.cxf.fediz.core.Claim;
 import org.apache.cxf.fediz.core.ClaimCollection;
-import org.apache.cxf.fediz.core.FederationPrincipal;
+import org.apache.cxf.fediz.core.FedizPrincipal;
 import org.apache.cxf.fediz.core.SecurityTokenThreadLocal;
 
 import org.springframework.security.core.Authentication;
@@ -71,8 +71,8 @@ public class FederationServlet extends HttpServlet {
             out.println("<p>role:" + item + "=" + ((request.isUserInRole(item)) ? "true" : "false") + "</p>");
         }
 
-        if (p instanceof FederationPrincipal) {
-            FederationPrincipal fp = (FederationPrincipal)p;
+        if (p instanceof FedizPrincipal) {
+            FedizPrincipal fp = (FedizPrincipal)p;
 
             ClaimCollection claims = fp.getClaims();
             for (Claim c : claims) {
@@ -81,7 +81,7 @@ public class FederationServlet extends HttpServlet {
             
             Element el = fp.getLoginToken();
             if (el != null) {
-                out.println("loginToken=FOUND{FederationPrincipal}<p>");
+                out.println("loginToken=FOUND{FedizPrincipal}<p>");
             }
             
             el = SecurityTokenThreadLocal.getToken();

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/08af52b6/systests/springWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
----------------------------------------------------------------------
diff --git a/systests/springWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java b/systests/springWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
index 740e14c..df0ce26 100644
--- a/systests/springWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
+++ b/systests/springWebapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
@@ -91,7 +91,7 @@ public class FederationServlet extends HttpServlet {
             
             Element el = fedToken.getLoginToken();
             if (el != null) {
-                out.println("loginToken=FOUND{FederationPrincipal}<p>");
+                out.println("loginToken=FOUND{FedizPrincipal}<p>");
             }
             
             el = SecurityTokenThreadLocal.getToken();


Mime
View raw message