这个问题着实让我费了好大功夫,本来想放弃Rememberme功能了,后来在邮件列表中发现了解决之道,特此贴出来为大家共享.
- <bean id="httpSessionContextIntegrationFilter" class="org.acegisecurity.context.HttpSessionContextIntegrationFilter">
- <property name="context">
- <value>org.acegisecurity.context.SecurityContextImpl<!---->value>
- <!---->property>
- <property name="forceEagerSessionCreation" value="true"/>
- <!---->bean>
注意:
<property name="forceEagerSessionCreation" value="true"/>这里添加了这个属性,并且设置为true;
邮件列表地址:http://opensource.atlassian.com/projects/spring/browse/SEC-183
贴出原文给大家分享一下:
HttpSessionContextIntegrationFilter now provides an forceEagerSessionCreation property (defaults to false). If set to true, it will cause a HttpSession to be created at the commencement of each web request. When the authentication mechanisms later run, they will use the constructor of WebAuthenticationDetails which does not force a HttpSession to be created, thus extracting a Session ID if the session was already available (either through normal creation operations or the forceEagerSessionCreation property) or leaving the Session ID as null if no HttpSession was available.
The anonymous and remember-me authentication mechanisms have been amended to not force session creation. Those using concurrent session support with either (or both) of these authentication mechanisms will be required to set HttpSessionContextIntegrationFilter.forceEagerSessionCreation = true.
注:在acegi的1.0.3和1.0.4版本中测试通过
分享到:
相关推荐
例如,Session一致性验证确保了用户的会话在多个并发请求中的一致性。Remember-Me服务则提供了自动登录功能,使得用户在一段时间内无须重新登录。 2. **方法安全** - 使用AOP(面向切面编程)模式实现安全代理,可以...
- **14.4 Remember-Me 接口和实现** 如何实现 Remember-Me 功能。 - **14.4.1 TokenBasedRememberMeServices** 基于令牌的 Remember-Me 服务实现。 - **14.4.2 PersistenceStrategy** 用于存储记住我标记的...
- **Remember-Me 认证**:支持“记住我”功能,以便用户无需每次都输入凭证即可访问受保护的资源。 - **添加 HTTP/HTTPS 信道安全**:通过 `<https>` 元素来配置 HTTPS 支持,确保数据传输的安全性。 - **会话管理**...
10. Remember Me(记住我功能):一次登录后,下次访问无需重新登录。 Shiro的架构从外部来看,API简单易用,具有明确的API契约。从内部来看,它拥有可扩展的架构,便于用户自定义实现。Shiro对外的API核心是...
- **记住我认证**:使用 `<remember-me>` 元素启用记住我功能,以便用户下次访问时无需重新登录。 - **添加 HTTP/HTTPS 通道安全**:使用 `<http>` 元素下的 `<requires-channel>` 子元素来强制某些 URL 使用 HTTPS ...
Spring Security 的前身是 Acegi 安全框架,在被 Spring 社区采纳后,经过不断发展和改进,成为了今天广泛使用的 Spring Security。自发布以来,Spring Security 不断进行版本更新,提供了更多的功能和更好的安全性...
- **Remember-Me 认证** - 支持记住用户登录状态的功能,使用户无需频繁输入用户名和密码。 - **添加 HTTP/HTTPS 信道安全** - 可以指定某些资源只能通过 HTTPS 访问,增强数据传输的安全性。 - **同步 Session...