一、查看 applicationContext-acegi-security.xml 配置文件,涉及到登录的配置为:
1 .
< bean id = "authenticationProcessingFilter" class = "org.javajohn.test.plugins.security.UserAuthenticationProcessingFilter" >
< property name = "authenticationManager" ref = "authenticationManager" />
< property name = "authenticationFailureUrl" >
< value > /login.jsp?login_error=1 </ value >
</ property >
< property name = "defaultTargetUrl" >
< value > /index.jsp </ value >
</ property >
< property name = "filterProcessesUrl" >
< value > /j_acegi_security_check </ value >
</ property >
< property name = "userManager" ref = "userManager" />
< property name = "rememberMeServices" ref = "rememberMeServices" />
< property name = "exceptionMappings" >
< value >
org.acegisecurity.AuthenticationException=/login.jsp?login_error=user_psw_error
org.acegisecurity.concurrent.ConcurrentLoginException=/login.jsp?login_error=too_many_user_error
</ value >
</ property >
</ bean >
2 . < bean id = "authenticationManager"
class = "org.acegisecurity.providers.ProviderManager" >
< property name = "providers" >
< list >
< ref local = "daoAuthenticationProvider" />
< bean class = "org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider" >
< property name = "key" value = "javajohnKey" />
</ bean >
< bean class = "org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider" >
< property name = "key" value = "javajohnKey" />
</ bean >
</ list >
</ property >
</ bean >
3 .
< bean id = "daoAuthenticationProvider" class = "org.acegisecurity.providers.dao.DaoAuthenticationProvider" >
< property name = "userDetailsService" ref = "jdbcDaoImpl" />
< property name = "userCache" >
< bean class = "org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache" >
< property name = "cache" >
< bean class = "org.springframework.cache.ehcache.EhCacheFactoryBean" >
< property name = "cacheManager" >
< bean class = "org.springframework.cache.ehcache.EhCacheManagerFactoryBean" />
</ property >
< property name = "cacheName" value = "userCache" />
</ bean >
</ property >
</ bean >
</ property >
< property name = "passwordEncoder" ref = "passwordEncoder" />
</ bean >
4 . < bean id = "jdbcDaoImpl"
class = "org.acegisecurity.userdetails.jdbc.JdbcDaoImpl" >
< property name = "dataSource" ref = "dataSource" />
< property name = "usersByUsernameQuery" >
< value >
select loginid,passwd,1 from users where status='1' and loginid = ?
</ value >
</ property >
< property name = "authoritiesByUsernameQuery" >
< value >
select u.loginid,p.name from
users u,roles r,permissions p,user_role ur,role_permis rp
where
u.id=ur.user_id and <span style=
分享到:
相关推荐
spring -acegi安全验证源码,
acegi源码解读.txtacegi源码解读.txtacegi源码解读.txt
acegi,acegi,acegi
Acegi学习笔记--Acegi详解Acegi学习笔记--Acegi详解Acegi学习笔记--Acegi详解Acegi学习笔记--Acegi详解Acegi学习笔记--Acegi详解
NULL 博文链接:https://zw7534313.iteye.com/blog/2224254
Acegi Security为基于J2EE的企业应用软件提供全面的安全解决方案。正如你在本手册中看到的那样,我们尝试为您提供有用的,高可配置的安全系统。 Acegi Security专注于在企业应用安全层为您提供帮助,你将会发现和...
acegi-security 1.0.2.jar
Spring源代码解析(十):Spring_Acegi框架授权的实现.doc
不错的ACEGI 教程
acegi-security-1.0.4-src.zip acegi-security-1.0.4.jar的源码
Acegi学习笔记(JAVA系统安全编程时用到),我就用到了Acegi,真的太牛了。
Acegi安全系统,是一个用于Spring Framework的安全框架,能够和目前流行的Web... 在Acegi安全系统中,需要被认证的用户,系统或代理称为"Principal"。Acegi安全系统和其他的安全系统不同,它并没有角色和用户组的概念。
Acegi文档 spring acegi 详细文档
1、一个Acegi的例子,可以运行 2、一个很好的学Acegi的网址,0基础学习Acegi,强烈推荐 3、有什么问题可以发邮件heroshen@126.com讨论
Acegi能做什么 Acegi的体系结构 Acegi核心组件 典型的web认证过程 Acegi的登陆认证 Acegi对安全对象的访问控制 Filter 组件 Acegi的不足之处
acegi-security的源代码大全,解压缩即可。
Acegi安全系统,是一个用于Spring Framework的安全框架,能够和目前流行的Web容器无缝集成。它使用了Spring的方式提供了安全和认证安全服务,包括使用Bean Context,拦截器和面向接口的编程方式。因此,Acegi安全...
acegi 框架 介绍 spring 安全