Java Spring boot安全性记住我令牌不工作
由于某些原因,我无法让Spring Security与我一起工作。 它从不在客户端创建cookie 这是我的登录表Java Spring boot安全性记住我令牌不工作,java,spring,spring-mvc,spring-security,Java,Spring,Spring Mvc,Spring Security,由于某些原因,我无法让Spring Security与我一起工作。 它从不在客户端创建cookie 这是我的登录表 记住我 也试过 记住我 这是我的安全设置 http.authorizeRequests() ...... .anyRequest().fullyAuthenticated() .and() .formLogin().loginPage("/login").failureUrl("/login?e
记住我
也试过
记住我
这是我的安全设置
http.authorizeRequests()
......
.anyRequest().fullyAuthenticated()
.and()
.formLogin().loginPage("/login").failureUrl("/login?error").permitAll()
.and()
.logout().logoutRequestMatcher(new AntPathRequestMatcher("/logout")).logoutSuccessUrl("/login")
.and()
.rememberMe()
.tokenValiditySeconds(31536000);
我尝试了自己的自定义表单和内置的Spring登录表单。。没人能记住我
我测试的方法是登录、复制安全url、关闭浏览器、打开浏览器并粘贴url。这就像将fullyAuthenticated()更改为authenticated()一样简单 正如javadocs for fullyAuthenticated()中所述: 指定已通过身份验证且未被“记住”的用户允许使用URL