Solving Tareq's tangle.
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
/*
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed 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
|
||||
* 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,
|
||||
@@ -15,28 +16,24 @@
|
||||
|
||||
package org.springframework.ws.soap.security.x509;
|
||||
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
|
||||
import org.springframework.security.authentication.AuthenticationProvider;
|
||||
import org.springframework.ws.soap.security.x509.cache.NullX509UserCache;
|
||||
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import java.security.cert.X509Certificate;
|
||||
|
||||
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.AuthenticationProvider;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.ws.soap.security.x509.cache.NullX509UserCache;
|
||||
import org.springframework.ws.soap.security.x509.cache.X509UserCache;
|
||||
|
||||
import java.security.cert.X509Certificate;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
/*
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed 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
|
||||
* 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,
|
||||
@@ -15,20 +16,18 @@
|
||||
|
||||
package org.springframework.ws.soap.security.x509;
|
||||
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
import org.springframework.security.authentication.AbstractAuthenticationToken;
|
||||
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.springframework.security.authentication.AbstractAuthenticationToken;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
|
||||
/**
|
||||
* <code>Authentication</code> implementation for X.509 client-certificate authentication.
|
||||
* <p>Migrated from Spring Security 2 since it has been removed in Spring Security 3.</p>
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id: X509AuthenticationToken.java 2544 2008-01-29 11:50:33Z luke_t $
|
||||
*/
|
||||
public class X509AuthenticationToken extends AbstractAuthenticationToken {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
/*
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed 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
|
||||
* 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,
|
||||
@@ -15,12 +16,11 @@
|
||||
|
||||
package org.springframework.ws.soap.security.x509;
|
||||
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import java.security.cert.X509Certificate;
|
||||
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
|
||||
/**
|
||||
* Populates the <code>UserDetails</code> associated with the X.509
|
||||
@@ -34,7 +34,6 @@ import java.security.cert.X509Certificate;
|
||||
* <p>Migrated from Spring Security 2 since it has been removed in Spring Security 3.</p>
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id: X509AuthoritiesPopulator.java 2544 2008-01-29 11:50:33Z luke_t $
|
||||
*/
|
||||
public interface X509AuthoritiesPopulator {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
/*
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed 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
|
||||
* 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,
|
||||
@@ -15,24 +16,18 @@
|
||||
|
||||
package org.springframework.ws.soap.security.x509.cache;
|
||||
|
||||
import net.sf.ehcache.CacheException;
|
||||
import net.sf.ehcache.Element;
|
||||
import net.sf.ehcache.Ehcache;
|
||||
|
||||
import org.springframework.ws.soap.security.x509.X509UserCache;
|
||||
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import java.security.cert.X509Certificate;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
import org.springframework.dao.DataRetrievalFailureException;
|
||||
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.security.cert.X509Certificate;
|
||||
import net.sf.ehcache.CacheException;
|
||||
import net.sf.ehcache.Ehcache;
|
||||
import net.sf.ehcache.Element;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
|
||||
/**
|
||||
@@ -42,7 +37,6 @@ import java.security.cert.X509Certificate;
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @author Ben Alex
|
||||
* @version $Id: EhCacheBasedX509UserCache.java 2544 2008-01-29 11:50:33Z luke_t $
|
||||
*/
|
||||
public class EhCacheBasedX509UserCache implements X509UserCache, InitializingBean {
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
/*
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed 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
|
||||
* 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,
|
||||
@@ -15,19 +16,16 @@
|
||||
|
||||
package org.springframework.ws.soap.security.x509.cache;
|
||||
|
||||
import org.springframework.ws.soap.security.x509.X509UserCache;
|
||||
import java.security.cert.X509Certificate;
|
||||
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import java.security.cert.X509Certificate;
|
||||
|
||||
|
||||
/**
|
||||
* "Cache" that doesn't do any caching.
|
||||
* <p>Migrated from Spring Security 2 since it has been removed in Spring Security 3.</p>
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id: NullX509UserCache.java 2544 2008-01-29 11:50:33Z luke_t $
|
||||
*/
|
||||
public class NullX509UserCache implements X509UserCache {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
/*
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed 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
|
||||
* 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,
|
||||
@@ -13,16 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.soap.security.x509;
|
||||
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
package org.springframework.ws.soap.security.x509.cache;
|
||||
|
||||
import java.security.cert.X509Certificate;
|
||||
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
|
||||
/**
|
||||
* Provides a cache of {@link UserDetails} objects for the
|
||||
* {@link X509AuthenticationProvider}.
|
||||
* {@link org.springframework.ws.soap.security.x509.X509AuthenticationProvider}.
|
||||
* <p>
|
||||
* Similar in function to the {@link org.springframework.security.core.userdetails.UserCache}
|
||||
* used by the Dao provider, but the cache is keyed with the user's certificate
|
||||
@@ -31,7 +32,6 @@ import java.security.cert.X509Certificate;
|
||||
* <p>Migrated from Spring Security 2 since it has been removed in Spring Security 3.</p>
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id: X509UserCache.java 2544 2008-01-29 11:50:33Z luke_t $
|
||||
*/
|
||||
public interface X509UserCache {
|
||||
//~ Methods ========================================================================================================
|
||||
Reference in New Issue
Block a user