CAS身份验证 - 找不到CSRF令牌

时间:2017-06-28 16:42:51

标签: java spring spring-security cas jasig

我使用Apereo CAS(以前的Jasig CAS)(github here)。接下来,我在Vaadin中创建了一个非常简单的应用程序,它在身份验证期间连接到CAS。一切顺利无效,直到我从 Spring Security 打开 CSRF

如果启用了CSRF,则重定向到CAS登录页面可以正常工作。但是在成功验证(登录,passoword)之后,CAS想要重定向回我的应用程序。然后我看到了这个:

@EnableWebSecurity

我使用Spring Boot @Override protected void configure(HttpSecurity http) throws Exception { http .addFilter(casAuthenticationFilter()) .addFilterBefore(singleSignOutFilter(), CasAuthenticationFilter.class) .exceptionHandling() .authenticationEntryPoint(casAuthenticationEntryPoint()) .and() .authorizeRequests() .antMatchers("/login") .permitAll() .anyRequest() .authenticated(); http.csrf().disable(); //works when disable } ,所以请从那里看一下配置:

1.5.4.RELEASE

我的问题: 如何使用CAS身份验证配置Spring Security以使CSRF正常工作?

我正在使用Spring Boot 8.0.5(maven parent)和Vaadin for p in pattern: for event in p: if event == 1: # Iterate backwards through p from current position until you reach the last event that equals 1 (BOM)。

0 个答案:

没有答案
相关问题