Move UserDetails interface to net.sf.acegisecurity package.

This commit is contained in:
Ben Alex 2004-07-13 22:38:20 +00:00
parent 064cd3c7bf
commit 48b1cb7c85
29 changed files with 58 additions and 38 deletions

View File

@ -20,6 +20,7 @@ import net.sf.acegisecurity.AuthenticationException;
import net.sf.acegisecurity.AuthenticationServiceException;
import net.sf.acegisecurity.BadCredentialsException;
import net.sf.acegisecurity.DisabledException;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.AuthenticationProvider;
import net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken;
import net.sf.acegisecurity.providers.dao.cache.NullUserCache;

View File

@ -15,6 +15,9 @@
package net.sf.acegisecurity.providers.dao;
import net.sf.acegisecurity.UserDetails;
/**
* Provides alternative sources of the salt to use for encoding passwords.
*

View File

@ -15,6 +15,9 @@
package net.sf.acegisecurity.providers.dao;
import net.sf.acegisecurity.UserDetails;
/**
* Provides a cache of {@link User} objects.
*

View File

@ -15,8 +15,8 @@
package net.sf.acegisecurity.providers.dao.cache;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.UserCache;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheException;

View File

@ -15,8 +15,8 @@
package net.sf.acegisecurity.providers.dao.cache;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.UserCache;
import net.sf.acegisecurity.providers.dao.UserDetails;
/**

View File

@ -16,8 +16,8 @@
package net.sf.acegisecurity.providers.dao.event;
import net.sf.acegisecurity.Authentication;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.User;
import net.sf.acegisecurity.providers.dao.UserDetails;
import org.springframework.context.ApplicationEvent;

View File

@ -16,7 +16,7 @@
package net.sf.acegisecurity.providers.dao.event;
import net.sf.acegisecurity.Authentication;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.acegisecurity.UserDetails;
/**

View File

@ -16,7 +16,7 @@
package net.sf.acegisecurity.providers.dao.event;
import net.sf.acegisecurity.Authentication;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.acegisecurity.UserDetails;
/**

View File

@ -16,7 +16,7 @@
package net.sf.acegisecurity.providers.dao.event;
import net.sf.acegisecurity.Authentication;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.acegisecurity.UserDetails;
/**

View File

@ -16,9 +16,9 @@
package net.sf.acegisecurity.providers.dao.salt;
import net.sf.acegisecurity.AuthenticationServiceException;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.SaltSource;
import net.sf.acegisecurity.providers.dao.User;
import net.sf.acegisecurity.providers.dao.UserDetails;
import org.springframework.beans.factory.InitializingBean;

View File

@ -15,9 +15,9 @@
package net.sf.acegisecurity.providers.dao.salt;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.SaltSource;
import net.sf.acegisecurity.providers.dao.User;
import net.sf.acegisecurity.providers.dao.UserDetails;
import org.springframework.beans.factory.InitializingBean;

View File

@ -16,6 +16,7 @@
package net.sf.acegisecurity.providers.dao;
import net.sf.acegisecurity.GrantedAuthority;
import net.sf.acegisecurity.UserDetails;
/**

View File

@ -13,15 +13,23 @@
* limitations under the License.
*/
package net.sf.acegisecurity.providers.dao;
package net.sf.acegisecurity;
import net.sf.acegisecurity.GrantedAuthority;
import net.sf.acegisecurity.providers.dao.User;
import java.io.Serializable;
/**
* Provides core user information required by the package.
* Provides core user information.
*
* <P>
* Implementations are not used directly by Acegi Security for security
* purposes. They simply store user information which is later encapsulated
* into {@link Authentication} objects. This allows non-security related user
* information (such as email addresses, telephone numbers etc) to be stored
* in a convenient location.
* </p>
*
* <P>
* Concrete implementations must take particular care to ensure the non-null

View File

@ -15,6 +15,8 @@
package net.sf.acegisecurity.providers.dao;
import net.sf.acegisecurity.UserDetails;
import org.springframework.dao.DataAccessException;

View File

@ -17,9 +17,9 @@ package net.sf.acegisecurity.providers.dao.jdbc;
import net.sf.acegisecurity.GrantedAuthority;
import net.sf.acegisecurity.GrantedAuthorityImpl;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.AuthenticationDao;
import net.sf.acegisecurity.providers.dao.User;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.acegisecurity.providers.dao.UsernameNotFoundException;
import org.apache.commons.logging.Log;

View File

@ -15,8 +15,8 @@
package net.sf.acegisecurity.providers.dao.memory;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.AuthenticationDao;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.acegisecurity.providers.dao.UsernameNotFoundException;
import org.springframework.beans.factory.InitializingBean;

View File

@ -15,8 +15,8 @@
package net.sf.acegisecurity.providers.dao.memory;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.User;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.acegisecurity.providers.dao.UsernameNotFoundException;
import org.apache.commons.logging.Log;

View File

@ -15,8 +15,8 @@
package net.sf.acegisecurity.providers.dao.memory;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.User;
import net.sf.acegisecurity.providers.dao.UserDetails;
import org.springframework.beans.propertyeditors.PropertiesEditor;

View File

@ -19,9 +19,9 @@ import junit.framework.TestCase;
import net.sf.acegisecurity.GrantedAuthority;
import net.sf.acegisecurity.GrantedAuthorityImpl;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.AuthenticationDao;
import net.sf.acegisecurity.providers.dao.User;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.acegisecurity.providers.dao.UsernameNotFoundException;
import org.springframework.dao.DataAccessException;

View File

@ -23,6 +23,7 @@ import net.sf.acegisecurity.BadCredentialsException;
import net.sf.acegisecurity.DisabledException;
import net.sf.acegisecurity.GrantedAuthority;
import net.sf.acegisecurity.GrantedAuthorityImpl;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.TestingAuthenticationToken;
import net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken;
import net.sf.acegisecurity.providers.dao.cache.EhCacheBasedUserCache;

View File

@ -19,6 +19,7 @@ import junit.framework.TestCase;
import net.sf.acegisecurity.GrantedAuthority;
import net.sf.acegisecurity.GrantedAuthorityImpl;
import net.sf.acegisecurity.UserDetails;
/**

View File

@ -17,7 +17,7 @@ package net.sf.acegisecurity.providers.dao.jdbc;
import junit.framework.TestCase;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.UsernameNotFoundException;
import org.springframework.core.io.ClassPathResource;
@ -166,6 +166,20 @@ public class JdbcDaoTests extends TestCase {
}
}
private DataSource makeDataSource() throws Exception {
ClassPathResource dbScript = new ClassPathResource(
"acegisecuritytest.script");
String path = dbScript.getFile().getParentFile().getAbsolutePath();
DriverManagerDataSource ds = new DriverManagerDataSource();
ds.setDriverClassName("org.hsqldb.jdbcDriver");
ds.setUrl("jdbc:hsqldb:" + path + File.separator + "acegisecuritytest");
ds.setUsername("sa");
ds.setPassword("");
return ds;
}
private JdbcDaoImpl makePopulatedJdbcDao() throws Exception {
JdbcDaoImpl dao = new JdbcDaoImpl();
dao.setDataSource(makeDataSource());
@ -184,20 +198,6 @@ public class JdbcDaoTests extends TestCase {
return dao;
}
private DataSource makeDataSource()
throws Exception {
ClassPathResource dbScript = new ClassPathResource("acegisecuritytest.script");
String path = dbScript.getFile().getParentFile().getAbsolutePath();
DriverManagerDataSource ds = new DriverManagerDataSource();
ds.setDriverClassName("org.hsqldb.jdbcDriver");
ds.setUrl("jdbc:hsqldb:" + path + File.separator + "acegisecuritytest");
ds.setUsername("sa");
ds.setPassword("");
return ds;
}
//~ Inner Classes ==========================================================
private class MockMappingSqlQuery extends MappingSqlQuery {

View File

@ -19,8 +19,8 @@ import junit.framework.TestCase;
import net.sf.acegisecurity.GrantedAuthority;
import net.sf.acegisecurity.GrantedAuthorityImpl;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.User;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.acegisecurity.providers.dao.UsernameNotFoundException;

View File

@ -20,8 +20,8 @@ import junit.framework.TestCase;
import net.sf.acegisecurity.AuthenticationServiceException;
import net.sf.acegisecurity.GrantedAuthority;
import net.sf.acegisecurity.GrantedAuthorityImpl;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.providers.dao.User;
import net.sf.acegisecurity.providers.dao.UserDetails;
/**

View File

@ -24,7 +24,7 @@ import net.sf.acegisecurity.MockFilterConfig;
import net.sf.acegisecurity.MockHttpServletRequest;
import net.sf.acegisecurity.MockHttpServletResponse;
import net.sf.acegisecurity.MockHttpSession;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.ui.webapp.HttpSessionIntegrationFilter;
import org.apache.commons.codec.binary.Base64;

View File

@ -17,9 +17,9 @@ package sample.contact;
import net.sf.acegisecurity.AccessDeniedException;
import net.sf.acegisecurity.Authentication;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.context.ContextHolder;
import net.sf.acegisecurity.context.SecureContext;
import net.sf.acegisecurity.providers.dao.UserDetails;
import org.springframework.beans.factory.InitializingBean;

View File

@ -18,7 +18,7 @@ package sample.contact;
import net.sf.acegisecurity.Authentication;
import net.sf.acegisecurity.ConfigAttribute;
import net.sf.acegisecurity.ConfigAttributeDefinition;
import net.sf.acegisecurity.providers.dao.UserDetails;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.vote.AccessDecisionVoter;
import org.aopalliance.intercept.MethodInvocation;

View File

@ -18,9 +18,9 @@ package sample.contact;
import net.sf.acegisecurity.Authentication;
import net.sf.acegisecurity.AuthenticationCredentialsNotFoundException;
import net.sf.acegisecurity.GrantedAuthority;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.context.ContextHolder;
import net.sf.acegisecurity.context.SecureContext;
import net.sf.acegisecurity.providers.dao.UserDetails;
import org.springframework.beans.factory.InitializingBean;

View File

@ -16,9 +16,9 @@
package sample.contact;
import net.sf.acegisecurity.Authentication;
import net.sf.acegisecurity.UserDetails;
import net.sf.acegisecurity.context.ContextHolder;
import net.sf.acegisecurity.context.SecureContext;
import net.sf.acegisecurity.providers.dao.UserDetails;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;