http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationLoginService.java
----------------------------------------------------------------------
diff --git 
a/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationLoginService.java
 
b/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationLoginService.java
deleted file mode 100644
index 353d946..0000000
--- 
a/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationLoginService.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * 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.jetty8;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-
-import javax.security.auth.Subject;
-
-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.eclipse.jetty.security.IdentityService;
-import org.eclipse.jetty.security.LoginService;
-import org.eclipse.jetty.server.UserIdentity;
-import org.eclipse.jetty.util.component.AbstractLifeCycle;
-import org.eclipse.jetty.util.log.Log;
-import org.eclipse.jetty.util.log.Logger;
-
-public class FederationLoginService extends AbstractLifeCycle implements 
LoginService {
-    private static final Logger LOG = 
Log.getLogger(FederationLoginService.class);
-
-    protected IdentityService identityService = new 
FederationIdentityService();
-    protected String name;
-
-
-    public FederationLoginService() {
-    }
-
-    public FederationLoginService(String name) {
-        this.name = name;
-    }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        if (isRunning()) {
-            throw new IllegalStateException("Running");
-        }
-
-        this.name = name;
-    }
-
-    @Override
-    protected void doStart() throws Exception {
-        LOG.debug("doStart");
-        super.doStart();
-    }
-
-    /**
-     * username will be null since the credentials will contain all the 
relevant info
-     */
-    public UserIdentity login(String username, Object credentials, 
FedizContext config) {
-
-        try {
-            FedizResponse wfRes = null;
-            FedizRequest wfReq = (FedizRequest)credentials;
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Process SignIn request");
-                LOG.debug("token=\n" + wfReq.getResponseToken());
-            }
-
-            FedizProcessor wfProc =
-                FedizProcessorFactory.newFedizProcessor(config.getProtocol());
-            try {
-                wfRes = wfProc.processRequest(wfReq, config);
-            } catch (ProcessingException ex) {
-                LOG.warn("Federation processing failed: " + ex.getMessage());
-                return null;
-            }
-
-
-            // Validate the AudienceRestriction in Security Token (e.g. SAML)
-            // against the configured list of audienceURIs
-            if (wfRes.getAudience() != null) {
-                List<String> audienceURIs = config.getAudienceUris();
-                boolean validAudience = false;
-                for (String a : audienceURIs) {
-                    if (wfRes.getAudience().startsWith(a)) {
-                        validAudience = true;
-                        break;
-                    }
-                }
-
-                if (!validAudience) {
-                    LOG.warn("Token AudienceRestriction [" + 
wfRes.getAudience()
-                             + "] doesn't match with specified list of URIs.");
-                    return null;
-                }
-            }
-
-            // Add "Authenticated" role
-            List<String> roles = wfRes.getRoles();
-            if (roles == null || roles.isEmpty()) {
-                roles = Collections.singletonList("Authenticated");
-            } else if (config.isAddAuthenticatedRole()) {
-                roles = new ArrayList<>(roles);
-                roles.add("Authenticated");
-            }
-
-            FederationUserPrincipal user = new 
FederationUserPrincipal(wfRes.getUsername(), wfRes);
-
-            Subject subject = new Subject();
-            subject.getPrincipals().add(user);
-
-            String[] aRoles = new String[roles.size()];
-            roles.toArray(aRoles);
-
-            return identityService.newUserIdentity(subject, user, aRoles);
-
-        } catch (Exception ex) {
-            LOG.warn(ex);
-        }
-
-        return null;
-    }
-
-    public boolean validate(UserIdentity user) {
-        try {
-            FederationUserIdentity fui = (FederationUserIdentity)user;
-            return fui.getExpiryDate().after(new Date());
-        } catch (ClassCastException ex) {
-            LOG.warn("UserIdentity must be instance of 
FederationUserIdentity");
-            throw new IllegalStateException("UserIdentity must be instance of 
FederationUserIdentity");
-        }
-    }
-
-    @Override
-    public IdentityService getIdentityService() {
-        return identityService;
-    }
-
-    @Override
-    public void setIdentityService(IdentityService service) {
-        identityService = service;
-    }
-
-    public void logout(UserIdentity user) {
-
-    }
-
-    @Override
-    public UserIdentity login(String username, Object credentials) {
-        return null;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationUserIdentity.java
----------------------------------------------------------------------
diff --git 
a/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationUserIdentity.java
 
b/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationUserIdentity.java
deleted file mode 100644
index 23a978b..0000000
--- 
a/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationUserIdentity.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.jetty8;
-
-
-import java.security.Principal;
-import java.util.Arrays;
-import java.util.Date;
-
-import javax.security.auth.Subject;
-
-import org.w3c.dom.Element;
-import org.apache.cxf.fediz.core.processor.FedizResponse;
-import org.eclipse.jetty.server.UserIdentity;
-
-public class FederationUserIdentity implements UserIdentity {
-
-    private Subject subject;
-    private Principal principal;
-    private String[] roles;
-    private FedizResponse fedResponse;
-
-    public FederationUserIdentity(Subject subject, Principal principal,
-                                  String[] roles, FedizResponse fedResponse) {
-        this.subject = subject;
-        this.principal = principal;
-        if (roles != null) {
-            this.roles = Arrays.copyOf(roles, roles.length);
-        }
-        this.fedResponse = fedResponse;
-    }
-
-
-    public Subject getSubject() {
-        return subject;
-    }
-
-    public Principal getUserPrincipal() {
-        return principal;
-    }
-
-    public boolean isUserInRole(String role, Scope scope) {
-        if (scope != null && scope.getRoleRefMap() != null) {
-            role = scope.getRoleRefMap().get(role);
-        }
-
-        if (this.roles != null) {
-            for (String r : this.roles) {
-                if (r.equals(role)) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    public Date getExpiryDate() {
-        return fedResponse.getTokenExpires();
-    }
-
-    public String getIssuer() {
-        return fedResponse.getIssuer();
-    }
-
-    public String getAudience() {
-        return fedResponse.getAudience();
-    }
-
-    public String getId() {
-        return fedResponse.getUniqueTokenId();
-    }
-
-    public Element getToken() {
-        return fedResponse.getToken();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationUserPrincipal.java
----------------------------------------------------------------------
diff --git 
a/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationUserPrincipal.java
 
b/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationUserPrincipal.java
deleted file mode 100644
index 7122176..0000000
--- 
a/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationUserPrincipal.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.jetty8;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.w3c.dom.Element;
-
-import org.apache.cxf.fediz.core.ClaimCollection;
-import org.apache.cxf.fediz.core.FedizPrincipal;
-import org.apache.cxf.fediz.core.processor.FedizResponse;
-
-public class FederationUserPrincipal implements FedizPrincipal {
-    private String name;
-    private ClaimCollection claims;
-    private FedizResponse response;
-    private List<String> roles = Collections.emptyList();
-
-    public FederationUserPrincipal(String name, FedizResponse response) {
-        this.name = name;
-        this.response = response;
-        this.claims = new ClaimCollection(response.getClaims());
-        if (response.getRoles() != null) {
-            this.roles = response.getRoles();
-        }
-    }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-
-    @Override
-    public ClaimCollection getClaims() {
-        return claims;
-    }
-
-    // not public available
-    //[TODO] maybe find better approach, custom UserIdentity
-    FedizResponse getFedizResponse() {
-        return response;
-    }
-
-    @Override
-    public Element getLoginToken() {
-        return response.getToken();
-    }
-
-    public List<String> getRoleClaims() {
-        return Collections.unmodifiableList(roles);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/pom.xml b/plugins/pom.xml
index 135542d..1e3e19b 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -32,12 +32,9 @@
 
    <modules>
       <module>core</module>
-      <module>tomcat7</module>
       <module>tomcat8</module>
-      <module>jetty8</module>
       <module>jetty9</module>
       <module>spring</module>
-      <module>spring2</module>
       <module>spring3</module>
       <module>cxf</module>
    </modules>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/spring2/README.txt
----------------------------------------------------------------------
diff --git a/plugins/spring2/README.txt b/plugins/spring2/README.txt
deleted file mode 100644
index 652d9e3..0000000
--- a/plugins/spring2/README.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-Fediz configuration for Spring Security 2.0
--------------------------------------------
-
-The Servlet Container installation doesn't have to be updated before a Web 
Application can be deployed.
-
-It's recommended to use HTTPS to avoid sending tokens/cookies in clear text on 
the network.
-Please check your Servlet Container documentation how to set it up.
-
-Please check the Spring Security 2 example to get more information how to 
deploy a web application
-using Spring Security.
-
-The following wiki page explains how to configure the Fediz Spring plugin in 
your application:
-http://cxf.apache.org/fediz-spring-2.html
-
-The following wiki page explains the fediz configuration which is Container 
independent:
-http://cxf.apache.org/fediz-configuration.html
-
-Note: The Fediz Spring plugin is packaged with your application.
-Thus it's recommended to package it with the application
-using Apache Maven.

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/spring2/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/spring2/pom.xml b/plugins/spring2/pom.xml
deleted file mode 100644
index 527d843..0000000
--- a/plugins/spring2/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.cxf.fediz</groupId>
-        <artifactId>plugin</artifactId>
-        <version>2.0.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <artifactId>fediz-spring2</artifactId>
-    <name>Apache Fediz Plugin Spring2</name>
-    <packaging>bundle</packaging>
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <spring.security.version>2.0.8.RELEASE</spring.security.version>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>org.springframework.security</groupId>
-            <artifactId>spring-security-core</artifactId>
-            <version>${spring.security.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-web</artifactId>
-            <version>${spring.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>${junit.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf.fediz</groupId>
-            <artifactId>fediz-core</artifactId>
-            <version>${project.version}</version>
-            <type>jar</type>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <version>${servlet.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>${slf4j.version}</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>zip-file</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>attached</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                
<descriptor>src/main/assembly/assembly.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Implementation-Title>Apache CXF 
Fediz</Implementation-Title>
-                        <Implementation-Vendor>The Apache Software 
Foundation</Implementation-Vendor>
-                        
<Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
-                        
<Implementation-Version>${project.version}</Implementation-Version>
-                        <Specification-Title>Apache CXF 
Fediz</Specification-Title>
-                        <Specification-Vendor>The Apache Software 
Foundation</Specification-Vendor>
-                        
<Specification-Version>${project.version}</Specification-Version>
-                        <Export-Package>
-                            
org.apache.cxf.fediz.spring.*;version="${project.version}"
-                        </Export-Package>
-                        <Import-Package>
-                            !org.apache.cxf.fediz.spring*,
-                            org.apache.cxf.fediz.core.*,
-                            *;resolution:=optional
-                        </Import-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/spring2/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/plugins/spring2/src/main/assembly/assembly.xml 
b/plugins/spring2/src/main/assembly/assembly.xml
deleted file mode 100644
index 99a74db..0000000
--- a/plugins/spring2/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<assembly 
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0";
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-  
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
-http://maven.apache.org/xsd/assembly-1.1.0.xsd";>
-  <id>zip-with-dependencies</id>
-  <formats>
-    <format>zip</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory>/</outputDirectory>
-      <useProjectArtifact>true</useProjectArtifact>
-      <unpack>false</unpack>
-      <scope>runtime</scope>
-    </dependencySet>
-  </dependencySets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/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
deleted file mode 100644
index 4c5ba20..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfig.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.spring;
-
-import java.util.List;
-
-import org.apache.cxf.fediz.core.config.FedizContext;
-
-public interface FederationConfig {
-
-    List<FedizContext> getFedizContextList();
-
-    FedizContext getFedizContext(String contextName);
-
-    FedizContext getFedizContext();
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/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
deleted file mode 100644
index 706bb91..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationConfigImpl.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * 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.spring;
-
-import java.util.List;
-
-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;
-//import org.springframework.web.context.ServletContextAware;
-
-//public class FederationConfigImpl implements FederationConfig, 
ServletContextAware {
-public class FederationConfigImpl implements FederationConfig {
-
-    private static final Logger LOG = 
LoggerFactory.getLogger(FederationConfigImpl.class);
-
-    private Resource configFile;
-    private String contextName;
-
-    //private ServletContext servletContext;
-    private FedizConfigurator configurator = new FedizConfigurator();
-
-
-    public Resource getConfigFile() {
-        return configFile;
-    }
-
-    public void setConfigFile(Resource configFile) {
-        this.configFile = configFile;
-    }
-
-    public String getContextName() {
-        return contextName;
-    }
-
-    public void setContextName(String contextName) {
-        this.contextName = contextName;
-    }
-
-    public void init() {
-        Assert.notNull(this.configFile, "property 'configFile' mandatory");
-        try {
-            configurator.loadConfig(this.configFile.getFile());
-        } catch (Exception e) {
-            LOG.error("Failed to parse '" + configFile.getDescription() + "'", 
e);
-            throw new BeanCreationException("Failed to parse '" + 
configFile.getDescription() + "'");
-        }
-    }
-
-    @Override
-    public List<FedizContext> getFedizContextList() {
-        return configurator.getFedizContextList();
-    }
-
-    @Override
-    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.");
-        }
-        return ctx;
-    }
-
-
-    @Override
-    public FedizContext getFedizContext() {
-        if (contextName != null) {
-            LOG.debug("Reading federation configuration for context '{}'", 
contextName);
-            return getFedizContext(contextName);
-        } else {
-            Assert.notNull(contextName, "Property 'contextName' must be 
configured because ServletContext null");
-            return getFedizContext(contextName);
-        }
-    }
-
-
-    /*
-    @Override
-    public void setServletContext(ServletContext servletContext) {
-        this.servletContext = servletContext;
-    }
-    */
-
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationUser.java
----------------------------------------------------------------------
diff --git 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationUser.java 
b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationUser.java
deleted file mode 100644
index 5125be2..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/FederationUser.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.spring;
-
-import org.apache.cxf.fediz.core.ClaimCollection;
-import org.springframework.security.GrantedAuthority;
-import org.springframework.security.userdetails.User;
-
-public class FederationUser extends User {
-
-    private static final long serialVersionUID = -2231762973730849416L;
-
-    private ClaimCollection claims;
-
-    public FederationUser(String username, String password, boolean enabled, 
boolean accountNonExpired,
-                          boolean credentialsNonExpired, boolean 
accountNonLocked,
-                          //Collection<? extends GrantedAuthority> 
authorities) {
-                          GrantedAuthority[] authorities) {
-        super(username, password, enabled, accountNonExpired, 
credentialsNonExpired, accountNonLocked, authorities);
-    }
-
-    public FederationUser(String username, String password,
-//                          Collection<? extends GrantedAuthority> 
authorities, ClaimCollection claims) {
-                          GrantedAuthority[] authorities, ClaimCollection 
claims) {
-        super(username, password, true, true, true, true, authorities);
-        this.claims = claims;
-    }
-
-    public ClaimCollection getClaims() {
-        return this.claims;
-    }
-
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/SpringFedizMessageSource.java
----------------------------------------------------------------------
diff --git 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/SpringFedizMessageSource.java
 
b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/SpringFedizMessageSource.java
deleted file mode 100644
index 976641a..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/SpringFedizMessageSource.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.spring;
-
-import org.springframework.context.support.MessageSourceAccessor;
-import org.springframework.context.support.ResourceBundleMessageSource;
-
-
-/**
- * The default <code>MessageSource</code> used by Spring Security.
- * <p>All Spring Security classes requiring messge localization will by 
default use this class.
- * However, all such classes will also implement 
<code>MessageSourceAware</code> so that the application context can
- * inject an alternative message source. Therefore this class is only used 
when the deployment environment has not
- * specified an alternative message source.</p>
- *
- * @author Ben Alex
- */
-public class SpringFedizMessageSource extends ResourceBundleMessageSource {
-
-    public SpringFedizMessageSource() {
-        setBasename("org.apache.cxf.fediz.spring.messages");
-    }
-
-
-    public static MessageSourceAccessor getAccessor() {
-        return new MessageSourceAccessor(new SpringFedizMessageSource());
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/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
deleted file mode 100644
index d27af7b..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/AbstractFederationUserDetailsService.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.spring.authentication;
-
-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;
-import org.springframework.security.userdetails.UsernameNotFoundException;
-
-/**
- * Abstract class to construct a new User object based on the provided 
FederationResponseAuthenticationToken.
- */
-public abstract class AbstractFederationUserDetailsService
-        implements AuthenticationUserDetailsService {
-
-    /*
-    public final UserDetails loadUserDetails(final Authentication token) {
-
-    }*/
-    @Override
-    public final UserDetails loadUserDetails(Authentication token) throws 
UsernameNotFoundException {
-        if (!(token instanceof FederationResponseAuthenticationToken)) {
-            return null;
-        }
-        FederationResponseAuthenticationToken fedToken = 
(FederationResponseAuthenticationToken)token;
-        return loadUserDetails(fedToken.getResponse());
-    }
-
-    /**
-     * Protected template method for construct a {@link 
org.springframework.security.core.userdetails.UserDetails}
-     * via the supplied FedizResponse
-     *
-     * @return the newly created UserDetails object.
-     */
-    protected abstract UserDetails loadUserDetails(FedizResponse response);
-
-
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/ExpiredTokenException.java
----------------------------------------------------------------------
diff --git 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/ExpiredTokenException.java
 
b/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/ExpiredTokenException.java
deleted file mode 100644
index 4f8691a..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/ExpiredTokenException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.spring.authentication;
-
-import org.springframework.security.AuthenticationException;
-
-/**
- * To be called when a token has expired
- */
-public class ExpiredTokenException extends AuthenticationException {
-
-    private static final long serialVersionUID = 7639463618762010981L;
-
-    public ExpiredTokenException(String errorMessage) {
-        super(errorMessage);
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/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
deleted file mode 100644
index 42d1c92..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/**
- * 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.spring.authentication;
-
-import org.apache.cxf.fediz.core.config.FedizContext;
-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.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;
-//import 
org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper;
-//import 
org.springframework.security.core.authority.mapping.NullAuthoritiesMapper;
-import org.springframework.security.providers.AuthenticationProvider;
-import 
org.springframework.security.providers.UsernamePasswordAuthenticationToken;
-import 
org.springframework.security.userdetails.AuthenticationUserDetailsService;
-import org.springframework.security.userdetails.UserDetails;
-import org.springframework.security.userdetails.UserDetailsChecker;
-import 
org.springframework.security.userdetails.checker.AccountStatusUserDetailsChecker;
-import org.springframework.util.Assert;
-
-
-/**
- * This {@link AuthenticationProvider} implements the integration with the 
Identity Provider
- * based on the WS-Federation Passive Requestor Profile.
- */
-public class FederationAuthenticationProvider implements 
AuthenticationProvider, InitializingBean, MessageSourceAware {
-    private static final Logger LOG = 
LoggerFactory.getLogger(FederationAuthenticationProvider.class);
-
-    protected MessageSourceAccessor messages = 
SpringFedizMessageSource.getAccessor();
-
-    private AuthenticationUserDetailsService authenticationUserDetailsService;
-    private FederationConfig federationConfig;
-
-    private final UserDetailsChecker userDetailsChecker = new 
AccountStatusUserDetailsChecker();
-    //private GrantedAuthoritiesMapper authoritiesMapper = new 
NullAuthoritiesMapper();
-
-    public AuthenticationUserDetailsService 
getAuthenticationUserDetailsService() {
-        return authenticationUserDetailsService;
-    }
-
-    public void setAuthenticationUserDetailsService(
-        AuthenticationUserDetailsService authenticationUserDetailsService) {
-        this.authenticationUserDetailsService = 
authenticationUserDetailsService;
-    }
-
-    public FederationConfig getFederationConfig() {
-        return federationConfig;
-    }
-
-    public void setFederationConfig(FederationConfig federationConfig) {
-        this.federationConfig = federationConfig;
-    }
-
-
-
-    public void afterPropertiesSet() throws Exception {
-        Assert.notNull(this.authenticationUserDetailsService, "An 
authenticationUserDetailsService must be set");
-        Assert.notNull(this.messages, "A message source must be set");
-        Assert.notNull(this.federationConfig, "FederationConfig cannot be 
null.");
-    }
-
-    public Authentication authenticate(Authentication authentication) throws 
AuthenticationException {
-        if (!supports(authentication.getClass())) {
-            return null;
-        }
-
-        if (!(authentication instanceof UsernamePasswordAuthenticationToken)) {
-            return null;
-        }
-
-        // Ensure credentials are provided
-        if ((authentication.getCredentials() == null) || 
"".equals(authentication.getCredentials())) {
-            throw new 
BadCredentialsException(messages.getMessage("FederationAuthenticationProvider.noSignInRequest",
-                    "Failed to get SignIn request"));
-        }
-
-        FederationAuthenticationToken result = null;
-
-        if (result == null) {
-            result = this.authenticateNow(authentication);
-            result.setDetails(authentication.getDetails());
-        }
-
-        return result;
-    }
-
-    private FederationAuthenticationToken authenticateNow(final Authentication 
authentication)
-        throws AuthenticationException {
-        try {
-            FedizRequest wfReq = (FedizRequest)authentication.getCredentials();
-            FedizContext context = federationConfig.getFedizContext();
-            FedizProcessor wfProc =
-                FedizProcessorFactory.newFedizProcessor(context.getProtocol());
-            FedizResponse wfRes = wfProc.processRequest(wfReq, context);
-
-            final UserDetails userDetails = 
loadUserByFederationResponse(wfRes);
-            userDetailsChecker.check(userDetails);
-            return new FederationAuthenticationToken(userDetails, 
authentication.getCredentials(),
-                    userDetails.getAuthorities(), userDetails, wfRes);
-        } catch (Exception e) {
-            LOG.error("Failed to validate SignIn request", e);
-            throw new BadCredentialsException(e.getMessage(), e);
-        }
-    }
-
-    /**
-     * Template method for retrieving the UserDetails based on the federation 
response (wresult parameter).
-     *
-     * @param response The WS Federation response
-     * @return the UserDetails.
-     */
-    protected UserDetails loadUserByFederationResponse(final FedizResponse 
response) {
-        final FederationResponseAuthenticationToken token = new 
FederationResponseAuthenticationToken(response);
-        return this.authenticationUserDetailsService.loadUserDetails(token);
-    }
-
-    public void setMessageSource(final MessageSource messageSource) {
-        this.messages = new MessageSourceAccessor(messageSource);
-    }
-
-    @Override
-    public boolean supports(Class authentication) {
-        if 
(UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication)) {
-            return true;
-        } else {
-            return 
FederationAuthenticationToken.class.isAssignableFrom(authentication);
-        }
-    }
-
-    /*
-    public void setAuthoritiesMapper(GrantedAuthoritiesMapper 
authoritiesMapper) {
-        this.authoritiesMapper = authoritiesMapper;
-    }
-    */
-
-    /*
-    public boolean supports(final Class<?> authentication) {
-        return 
(UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication))
-            || 
(FederationAuthenticationToken.class.isAssignableFrom(authentication));
-    }
-    */
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/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
deleted file mode 100644
index 5e48e5c..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationToken.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * 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.spring.authentication;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.List;
-
-import org.w3c.dom.Element;
-import org.apache.cxf.fediz.core.ClaimCollection;
-import org.apache.cxf.fediz.core.FedizPrincipal;
-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;
-
-/**
- * Represents a successful WS-Federation based authentication.
- */
-public class FederationAuthenticationToken extends AbstractAuthenticationToken
-    implements Serializable, FedizPrincipal {
-
-    private static final long serialVersionUID = 1L;
-
-    private final Object credentials;
-    private final Object principal;
-    private final UserDetails userDetails;
-    private final FedizResponse response;
-    private List<String> roles = Collections.emptyList();
-
-
-    public FederationAuthenticationToken(final Object principal, final Object 
credentials,
-        final GrantedAuthority[] authorities, final UserDetails userDetails,
-        final FedizResponse response) {
-        super(authorities);
-
-        if ((principal == null) || "".equals(principal) || (credentials == 
null)
-            || "".equals(credentials) || (authorities == null) || (userDetails 
== null) || (response == null)) {
-            throw new IllegalArgumentException("Cannot pass null or empty 
values to constructor");
-        }
-
-        this.principal = principal;
-        this.credentials = credentials;
-        this.userDetails = userDetails;
-        this.response = response;
-        setAuthenticated(true);
-        if (response.getRoles() != null) {
-            this.roles = response.getRoles();
-        }
-    }
-
-    public Object getCredentials() {
-        return this.credentials;
-    }
-
-    public Object getPrincipal() {
-        return this.principal;
-    }
-
-    public FedizResponse getResponse() {
-        return this.response;
-    }
-
-    public UserDetails getUserDetails() {
-        return userDetails;
-    }
-
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(super.toString());
-        sb.append(" Response: ").append(this.response);
-        sb.append(" Credentials: ").append(this.credentials);
-
-        return sb.toString();
-    }
-
-    @Override
-    public ClaimCollection getClaims() {
-        return new ClaimCollection(response.getClaims());
-    }
-
-    @Override
-    public Element getLoginToken() {
-        return response.getToken();
-    }
-
-    public List<String> getRoleClaims() {
-        return Collections.unmodifiableList(roles);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/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
deleted file mode 100644
index d7f380c..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationResponseAuthenticationToken.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.spring.authentication;
-
-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 FedizResponse response;
-
-
-    public FederationResponseAuthenticationToken(final FedizResponse response) 
{
-        super(null);
-
-        this.response = response;
-    }
-
-    public Object getPrincipal() {
-        return this.response.getUsername();
-    }
-
-    public Object getCredentials() {
-        return this.response;
-    }
-
-    public FedizResponse getResponse() {
-        return this.response;
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/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
deleted file mode 100644
index c229dde..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/authentication/GrantedAuthoritiesUserDetailsFederationService.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.spring.authentication;
-
-import java.util.*;
-
-import org.apache.cxf.fediz.core.ClaimCollection;
-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;
-import org.springframework.security.userdetails.UserDetails;
-
-/**
- * This AuthenticationUserDetailsService implementation creates a 
FederationUser
- * object based on the data in the provided 
FederationResponseAuthenticationToken.
- */
-public class GrantedAuthoritiesUserDetailsFederationService
-        extends AbstractFederationUserDetailsService {
-
-    private boolean convertToUpperCase = true;
-
-    @Override
-    protected UserDetails loadUserDetails(FedizResponse response) {
-
-        List<GrantedAuthority> grantedAuthorities = new ArrayList<>();
-
-        if (response.getRoles() != null) {
-            for (final String role : response.getRoles()) {
-
-                grantedAuthorities.add(new GrantedAuthorityImpl("ROLE_"
-                                        + (this.convertToUpperCase ? 
role.toUpperCase() : role)));
-            }
-        }
-        return new FederationUser(response.getUsername(), "N/A",
-                                  (GrantedAuthority[]) 
grantedAuthorities.toArray(
-                                      new 
GrantedAuthority[grantedAuthorities.size()]),
-                                  new ClaimCollection(response.getClaims()));
-
-    }
-
-
-    /**
-     * Converts the role value to uppercase value.
-     *
-     * @param convertToUpperCase true if it should convert, false otherwise.
-     */
-    public void setConvertToUpperCase(final boolean convertToUpperCase) {
-        this.convertToUpperCase = convertToUpperCase;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/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
deleted file mode 100644
index dde6d4a..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/FederationPreAuthenticatedProcessingFilter.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.spring.preauth;
-
-import java.security.Principal;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.cxf.fediz.core.FedizPrincipal;
-import org.springframework.security.ui.FilterChainOrder;
-import 
org.springframework.security.ui.preauth.AbstractPreAuthenticatedProcessingFilter;
-
-/**
- * This AbstractPreAuthenticatedProcessingFilter implementation is based on the
- * J2EE container-based authentication mechanism. It will use the J2EE user
- * principal name as the pre-authenticated principal and the WS-Federation 
signin request
- * as the credentials.
- */
-public class FederationPreAuthenticatedProcessingFilter extends 
AbstractPreAuthenticatedProcessingFilter {
-
-    private static final String SECURITY_TOKEN_ATTR = 
"org.apache.fediz.SECURITY_TOKEN";
-
-    /**
-     * Return the J2EE user name.
-     */
-    protected Object getPreAuthenticatedPrincipal(HttpServletRequest 
httpRequest) {
-        Principal principal = httpRequest.getUserPrincipal();
-        if (logger.isDebugEnabled()) {
-            logger.debug("PreAuthenticated J2EE principal: "
-                         + principal == null ? null : principal.getName());
-        }
-        return principal;
-    }
-
-    /**
-     * For J2EE container-based authentication there is no generic way to
-     * retrieve the credentials, as such this method returns a fixed dummy
-     * value.
-     */
-    protected Object getPreAuthenticatedCredentials(HttpServletRequest 
httpRequest) {
-        Principal principal = httpRequest.getUserPrincipal() == null ? null : 
httpRequest.getUserPrincipal();
-        if (principal instanceof FedizPrincipal) {
-            Object obj = 
httpRequest.getSession(false).getAttribute(SECURITY_TOKEN_ATTR);
-            if (obj != null)  {
-                return obj;
-            } else {
-                logger.error("Session must contain Federation response");
-                throw new IllegalStateException("Session must contain 
Federation response");
-            }
-        } else {
-            logger.error("Principal must be instance of FedizPrincipal: " + 
principal);
-            throw new IllegalStateException("Principal must be instance of 
FedizPrincipal");
-        }
-        //return "N/A";
-    }
-
-    @Override
-    public int getOrder() {
-        return FilterChainOrder.BASIC_PROCESSING_FILTER;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/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
deleted file mode 100644
index 1c75b5c..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/preauth/PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.spring.preauth;
-
-import org.apache.cxf.fediz.core.ClaimCollection;
-import org.apache.cxf.fediz.core.FedizPrincipal;
-import org.apache.cxf.fediz.spring.FederationUser;
-import org.springframework.security.Authentication;
-import org.springframework.security.AuthenticationException;
-import org.springframework.security.GrantedAuthoritiesContainer;
-import org.springframework.security.GrantedAuthority;
-import 
org.springframework.security.providers.preauth.PreAuthenticatedAuthenticationToken;
-import 
org.springframework.security.userdetails.AuthenticationUserDetailsService;
-import org.springframework.security.userdetails.UserDetails;
-import org.springframework.security.userdetails.UsernameNotFoundException;
-
-import org.springframework.util.Assert;
-
-/**
- * <p>
- * This AuthenticationUserDetailsService implementation creates a UserDetails
- * object based solely on the information contained in the given
- * PreAuthenticatedAuthenticationToken. The user name is set to the name as
- * returned by PreAuthenticatedAuthenticationToken.getName(), the password is
- * set to a fixed dummy value (it will not be used by the
- * PreAuthenticatedAuthenticationProvider anyway), and the Granted Authorities
- * are retrieved from the details object as returned by
- * PreAuthenticatedAuthenticationToken.getDetails().
- *
- * <p>
- * The details object as returned by 
PreAuthenticatedAuthenticationToken.getDetails() must implement the
- * {@link GrantedAuthoritiesContainer} interface for this implementation to 
work.
- *l
- */
-public class PreAuthenticatedGrantedAuthoritiesUserDetailsFederationService
-        implements AuthenticationUserDetailsService {
-    /**
-     * Get a UserDetails object based on the user name contained in the given
-     * token, and the GrantedAuthorities as returned by the
-     * GrantedAuthoritiesContainer implementation as returned by
-     * the token.getDetails() method.
-     */
-    public final UserDetails 
loadUserDetails(PreAuthenticatedAuthenticationToken token) throws 
AuthenticationException {
-        Assert.notNull(token.getDetails());
-        Assert.isInstanceOf(GrantedAuthoritiesContainer.class, 
token.getDetails());
-        Assert.isInstanceOf(FedizPrincipal.class, token.getPrincipal());
-        GrantedAuthority[] authorities =
-            ((GrantedAuthoritiesContainer) 
token.getDetails()).getGrantedAuthorities();
-
-        return createuserDetails(token, authorities, 
((FedizPrincipal)token.getPrincipal()).getClaims());
-    }
-
-    /**
-     * Creates the final <tt>UserDetails</tt> object. Can be overridden to 
customize the contents.
-     *
-     * @param token the authentication request token
-     * @param authorities the pre-authenticated authorities.
-     */
-    protected UserDetails createuserDetails(Authentication token,
-        GrantedAuthority[] authorities, ClaimCollection claims) {
-        return new FederationUser(token.getName(), "N/A", authorities, claims);
-    }
-
-    @Override
-    public UserDetails loadUserDetails(Authentication token) throws 
UsernameNotFoundException {
-        Assert.notNull(token.getDetails());
-        Assert.isInstanceOf(PreAuthenticatedAuthenticationToken.class, token);
-        Assert.isInstanceOf(GrantedAuthoritiesContainer.class, 
token.getDetails());
-        Assert.isInstanceOf(FedizPrincipal.class, token.getPrincipal());
-        GrantedAuthority[] authorities =
-            ((GrantedAuthoritiesContainer) 
token.getDetails()).getGrantedAuthorities();
-
-        return createuserDetails(token, authorities, 
((FedizPrincipal)token.getPrincipal()).getClaims());
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/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
deleted file mode 100644
index 6786290..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * 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.spring.web;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.apache.cxf.fediz.core.config.FedizContext;
-import org.apache.cxf.fediz.core.exception.ProcessingException;
-import org.apache.cxf.fediz.core.metadata.MetadataDocumentHandler;
-import org.apache.cxf.fediz.core.processor.FedizProcessor;
-import org.apache.cxf.fediz.core.processor.FedizProcessorFactory;
-import org.apache.cxf.fediz.core.processor.RedirectionResponse;
-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;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.security.AuthenticationException;
-import org.springframework.security.ui.AuthenticationEntryPoint;
-import org.springframework.util.Assert;
-
-
-/**
- * Used by the <code>ExceptionTranslationFilter</code> to commence 
authentication via the
- * WS-Federation protocol.
- * <p>
- * The user's browser will be redirected to the IDP.
- *
- */
-public class FederationAuthenticationEntryPoint implements 
AuthenticationEntryPoint,
-    InitializingBean, ApplicationContextAware {
-
-    /**
-     * The key used to save the context of the request
-     */
-    public static final String SAVED_CONTEXT = "SAVED_CONTEXT";
-
-    private static final Logger LOG = 
LoggerFactory.getLogger(FederationAuthenticationEntryPoint.class);
-
-    private ApplicationContext appContext;
-    private FederationConfig federationConfig;
-    //private String servletContext;
-
-    public FederationConfig getFederationConfig() {
-        return federationConfig;
-    }
-
-    public void setFederationConfig(FederationConfig federationConfig) {
-        this.federationConfig = federationConfig;
-    }
-
-    public void afterPropertiesSet() throws Exception {
-        Assert.notNull(this.appContext, "ApplicationContext cannot be null.");
-        Assert.notNull(this.federationConfig, "FederationConfig cannot be 
null.");
-    }
-
-    /**
-     * Template method for you to do your own pre-processing before the 
redirect occurs.
-     *
-     * @param request the HttpServletRequest
-     * @param response the HttpServletResponse
-     */
-    protected void preCommence(final HttpServletRequest request, final 
HttpServletResponse response) {
-
-    }
-
-    @Override
-    public void setApplicationContext(ApplicationContext applicationContext) 
throws BeansException {
-        this.appContext = applicationContext;
-    }
-
-    @Override
-    public void commence(ServletRequest request, ServletResponse response,
-                         AuthenticationException authException) throws 
IOException, ServletException {
-
-        HttpServletRequest hrequest = (HttpServletRequest)request;
-        HttpServletResponse hresponse = (HttpServletResponse)response;
-        FedizContext fedContext = federationConfig.getFedizContext();
-        LOG.debug("Federation context: {}", fedContext);
-
-        // Check to see if it is a metadata request
-        MetadataDocumentHandler mdHandler = new 
MetadataDocumentHandler(fedContext);
-        if (mdHandler.canHandleRequest(hrequest)) {
-            mdHandler.handleRequest(hrequest, hresponse);
-            return;
-        }
-
-        String redirectUrl = null;
-        try {
-            FedizProcessor wfProc =
-                
FedizProcessorFactory.newFedizProcessor(fedContext.getProtocol());
-
-            RedirectionResponse redirectionResponse =
-                wfProc.createSignInRequest(hrequest, fedContext);
-            redirectUrl = redirectionResponse.getRedirectionURL();
-
-            if (redirectUrl == null) {
-                LOG.warn("Failed to create SignInRequest.");
-                hresponse.sendError(
-                        HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Failed 
to create SignInRequest.");
-            }
-
-            Map<String, String> headers = redirectionResponse.getHeaders();
-            if (!headers.isEmpty()) {
-                for (Entry<String, String> entry : headers.entrySet()) {
-                    hresponse.addHeader(entry.getKey(), entry.getValue());
-                }
-            }
-
-            HttpSession session = 
((HttpServletRequest)request).getSession(true);
-            session.setAttribute(SAVED_CONTEXT, 
redirectionResponse.getRequestState().getState());
-        } catch (ProcessingException ex) {
-            System.err.println("Failed to create SignInRequest: " + 
ex.getMessage());
-            LOG.warn("Failed to create SignInRequest: " + ex.getMessage());
-            hresponse.sendError(
-                               HttpServletResponse.SC_INTERNAL_SERVER_ERROR, 
"Failed to create SignInRequest.");
-        }
-
-        preCommence(hrequest, hresponse);
-        if (LOG.isInfoEnabled()) {
-            LOG.info("Redirecting to IDP: " + redirectUrl);
-        }
-        hresponse.sendRedirect(redirectUrl);
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/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
deleted file mode 100644
index 4104e8f..0000000
--- 
a/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/**
- * 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.spring.web;
-
-import java.io.IOException;
-import java.security.cert.X509Certificate;
-import java.util.Date;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.apache.cxf.fediz.core.FederationConstants;
-import org.apache.cxf.fediz.core.SAMLSSOConstants;
-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.RedirectionResponse;
-import org.apache.cxf.fediz.spring.FederationConfig;
-import org.apache.cxf.fediz.spring.authentication.ExpiredTokenException;
-import 
org.apache.cxf.fediz.spring.authentication.FederationAuthenticationToken;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.security.Authentication;
-import org.springframework.security.AuthenticationException;
-import org.springframework.security.BadCredentialsException;
-import org.springframework.security.context.SecurityContext;
-import org.springframework.security.context.SecurityContextHolder;
-import 
org.springframework.security.providers.UsernamePasswordAuthenticationToken;
-import org.springframework.security.ui.AbstractProcessingFilter;
-import org.springframework.security.ui.FilterChainOrder;
-
-
-public class FederationAuthenticationFilter extends AbstractProcessingFilter {
-
-    private static final Logger LOG = 
LoggerFactory.getLogger(FederationAuthenticationFilter.class);
-
-    private FederationConfig federationConfig;
-
-    public FederationAuthenticationFilter() {
-        super();
-    }
-
-    /**
-     *
-     */
-    @Override
-    protected boolean requiresAuthentication(final HttpServletRequest request, 
final HttpServletResponse response) {
-        boolean result = 
request.getRequestURI().contains(getFilterProcessesUrl());
-        result |= isTokenExpired();
-        if (logger.isDebugEnabled()) {
-            logger.debug("requiresAuthentication = " + result);
-        }
-        return result;
-    }
-
-    private boolean isTokenExpired() {
-        SecurityContext context = SecurityContextHolder.getContext();
-        boolean detectExpiredTokens =
-            federationConfig != null && 
federationConfig.getFedizContext().isDetectExpiredTokens();
-        if (context != null && detectExpiredTokens) {
-            Authentication authentication = context.getAuthentication();
-            if (authentication instanceof FederationAuthenticationToken) {
-                Date tokenExpires =
-                    
((FederationAuthenticationToken)authentication).getResponse().getTokenExpires();
-                if (tokenExpires == null) {
-                    return false;
-                }
-
-                Date currentTime = new Date();
-                if (currentTime.after(tokenExpires)) {
-                    return true;
-                }
-            }
-        }
-
-        return false;
-    }
-
-    @Override
-    public int getOrder() {
-        return FilterChainOrder.BASIC_PROCESSING_FILTER;
-    }
-
-    @Override
-    public Authentication attemptAuthentication(HttpServletRequest request) 
throws AuthenticationException {
-
-        if (isTokenExpired()) {
-            throw new ExpiredTokenException("Token is expired");
-        }
-
-        verifySavedState(request);
-
-        String wa = request.getParameter(FederationConstants.PARAM_ACTION);
-        String responseToken = getResponseToken(request);
-        FedizRequest wfReq = new FedizRequest();
-        wfReq.setAction(wa);
-        wfReq.setResponseToken(responseToken);
-        wfReq.setState(getState(request));
-        wfReq.setRequest(request);
-
-        X509Certificate certs[] =
-            
(X509Certificate[])request.getAttribute("javax.servlet.request.X509Certificate");
-        wfReq.setCerts(certs);
-
-        final UsernamePasswordAuthenticationToken authRequest = new 
UsernamePasswordAuthenticationToken(null, wfReq);
-
-        
authRequest.setDetails(authenticationDetailsSource.buildDetails(request));
-
-        return this.getAuthenticationManager().authenticate(authRequest);
-    }
-
-    private void verifySavedState(HttpServletRequest request) {
-        HttpSession session = request.getSession(false);
-        if (session != null) {
-            String savedContext = 
(String)session.getAttribute(FederationAuthenticationEntryPoint.SAVED_CONTEXT);
-            String state = getState(request);
-            if (savedContext != null && !savedContext.equals(state)) {
-                logger.warn("The received state does not match the state saved 
in the context");
-                throw new BadCredentialsException("The received state does not 
match the state saved in the context");
-            }
-        }
-    }
-
-    private String getState(ServletRequest request) {
-        if (request.getParameter(FederationConstants.PARAM_CONTEXT) != null) {
-            return request.getParameter(FederationConstants.PARAM_CONTEXT);
-        } else if (request.getParameter(SAMLSSOConstants.RELAY_STATE) != null) 
{
-            return request.getParameter(SAMLSSOConstants.RELAY_STATE);
-        }
-
-        return null;
-    }
-
-    @Override
-    public void onUnsuccessfulAuthentication(HttpServletRequest request, 
HttpServletResponse response,
-                                             AuthenticationException 
authException) {
-        if (authException instanceof ExpiredTokenException) {
-            String redirectUrl = null;
-            try {
-                FedizContext fedContext = federationConfig.getFedizContext();
-                FedizProcessor wfProc =
-                    
FedizProcessorFactory.newFedizProcessor(fedContext.getProtocol());
-                RedirectionResponse redirectionResponse =
-                    wfProc.createSignInRequest(request, fedContext);
-                redirectUrl = redirectionResponse.getRedirectionURL();
-
-                if (redirectUrl == null) {
-                    LOG.warn("Failed to create SignInRequest. Redirect URL 
null");
-                    throw new BadCredentialsException("Failed to create 
SignInRequest. Redirect URL null");
-                }
-
-                Map<String, String> headers = redirectionResponse.getHeaders();
-                if (!headers.isEmpty()) {
-                    for (Entry<String, String> entry : headers.entrySet()) {
-                        response.addHeader(entry.getKey(), entry.getValue());
-                    }
-                }
-
-            } catch (ProcessingException ex) {
-                LOG.warn("Failed to create SignInRequest", ex);
-                throw new BadCredentialsException("Failed to create 
SignInRequest: " + ex.getMessage());
-            }
-
-            if (LOG.isInfoEnabled()) {
-                LOG.info("Redirecting to IDP: " + redirectUrl);
-            }
-            try {
-                response.sendRedirect(redirectUrl);
-            } catch (IOException ex) {
-                throw new BadCredentialsException(ex.getMessage(), ex);
-            }
-        }
-
-        try {
-            response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
-        } catch (IOException e) {
-            throw authException;
-        }
-    }
-
-    private String getResponseToken(ServletRequest request) {
-        if (request.getParameter(FederationConstants.PARAM_RESULT) != null) {
-            return request.getParameter(FederationConstants.PARAM_RESULT);
-        } else if (request.getParameter(SAMLSSOConstants.SAML_RESPONSE) != 
null) {
-            return request.getParameter(SAMLSSOConstants.SAML_RESPONSE);
-        }
-
-        return null;
-    }
-
-    @Override
-    public String getDefaultFilterProcessesUrl() {
-        return "/j_spring_fediz_security_check";
-    }
-
-    public FederationConfig getFederationConfig() {
-        return federationConfig;
-    }
-
-    public void setFederationConfig(FederationConfig fedConfig) {
-        this.federationConfig = fedConfig;
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/spring2/src/main/resources/org/apache/cxf/fediz/spring/messages.properties
----------------------------------------------------------------------
diff --git 
a/plugins/spring2/src/main/resources/org/apache/cxf/fediz/spring/messages.properties
 
b/plugins/spring2/src/main/resources/org/apache/cxf/fediz/spring/messages.properties
deleted file mode 100644
index 8d3d4bb..0000000
--- 
a/plugins/spring2/src/main/resources/org/apache/cxf/fediz/spring/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-FederationAuthenticationProvider.incorrectKey=The presented 
FederationAuthenticationToken does not contain the expected key
-FederationAuthenticationProvider.noSignInRequest=Failed to get SignIn request

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/tomcat7/README.txt
----------------------------------------------------------------------
diff --git a/plugins/tomcat7/README.txt b/plugins/tomcat7/README.txt
deleted file mode 100644
index 94565bb..0000000
--- a/plugins/tomcat7/README.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Fediz configuration in Tomcat
------------------------------
-
-The Tomcat installation must be updated before a Web Application can be 
deployed.
-
-The following wiki page gives instructions how to do that:
-http://cxf.apache.org/fediz-tomcat.html
-
-The following wiki page explains the fediz configuration which is Container 
independent:
-http://cxf.apache.org/fediz-configuration.html

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/tomcat7/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/tomcat7/pom.xml b/plugins/tomcat7/pom.xml
deleted file mode 100644
index 958d108..0000000
--- a/plugins/tomcat7/pom.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.cxf.fediz</groupId>
-        <artifactId>plugin</artifactId>
-        <version>2.0.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <artifactId>fediz-tomcat7</artifactId>
-    <name>Apache Fediz Plugin for Tomcat 7</name>
-    <packaging>jar</packaging>
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.tomcat</groupId>
-            <artifactId>tomcat-catalina</artifactId>
-            <version>${tomcat7.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>${junit.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf.fediz</groupId>
-            <artifactId>fediz-core</artifactId>
-            <version>${project.version}</version>
-            <type>jar</type>
-            <scope>compile</scope>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>zip-file</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>attached</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                
<descriptor>src/main/assembly/assembly.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/plugins/tomcat7/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/plugins/tomcat7/src/main/assembly/assembly.xml 
b/plugins/tomcat7/src/main/assembly/assembly.xml
deleted file mode 100644
index 99a74db..0000000
--- a/plugins/tomcat7/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<assembly 
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0";
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-  
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
-http://maven.apache.org/xsd/assembly-1.1.0.xsd";>
-  <id>zip-with-dependencies</id>
-  <formats>
-    <format>zip</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory>/</outputDirectory>
-      <useProjectArtifact>true</useProjectArtifact>
-      <unpack>false</unpack>
-      <scope>runtime</scope>
-    </dependencySet>
-  </dependencySets>
-</assembly>

Reply via email to