论坛首页 Java企业应用论坛

吐槽spring security 3.2 框架

浏览 4715 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2014-03-14  

在实际应用中觉得spring security的命名空间缺少两个元素:<!--[endif]-->

form-login 没有Post-only属性的配置哭,而UsernamePasswordAuthenticationFilter 源码中post默认为true

public class UsernamePasswordAuthenticationFilter extends

AbstractAuthenticationProcessingFilter {

public static final String SPRING_SECURITY_FORM_USERNAME_KEY = "j_username";

public static final String SPRING_SECURITY_FORM_PASSWORD_KEY = "j_password";

 

@Deprecated

public static final String SPRING_SECURITY_LAST_USERNAME_KEY = "SPRING_SECURITY_LAST_USERNAME";

private String usernameParameter = "j_username";

private String passwordParameter = "j_password";

private boolean postOnly = true;


 

why  http 中提供了FilterSecurityInterceptor的accessDecisionManager和authenticationManager的配置,而不提供FilterInvocationSecurityMetadataSource的配置??


 

  • 大小: 45.3 KB
  • 大小: 57.2 KB
   发表时间:2014-03-18  
都已经是formlogin了为啥还要设置成false呢

<sec:custom-filter ref="customLginFilter" position="FORM_LOGIN_FILTER"  />

<bean id="customLginFilter" class="com.custom.sercurity.filter.LoginTypeUsernamePasswordAuthenticationFilter">
<property name="postOnly" value="false" />
</bean>
0 请登录后投票
   发表时间:2014-03-19  
我觉得既然可以设置POSTONLY就肯定有POSTONLY为false的情况!但它的命名空间
form-login居然不可以设置。
0 请登录后投票
   发表时间:2014-03-21  
还是觉得这东西用着麻烦,试试Shiro吧
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics