提交 fb69c6e9 编写于 作者: alvachien's avatar alvachien

retry the logon

上级 c593d624
...@@ -172,17 +172,22 @@ public class SecurityConfig { ...@@ -172,17 +172,22 @@ public class SecurityConfig {
@Bean @Bean
SecurityFilterChain defaultSecurityFilterChain(HttpSecurity http) throws Exception { SecurityFilterChain defaultSecurityFilterChain(HttpSecurity http) throws Exception {
http http
// .authorizeHttpRequests(authorize -> .authorizeHttpRequests(authorize ->
// authorize.anyRequest().authenticated() authorize.anyRequest().authenticated()
// )
//.formLogin(withDefaults());
.formLogin(
form -> form.loginPage("/login").loginProcessingUrl("/login").successForwardUrl("/")
) )
.authorizeHttpRequests( .formLogin(withDefaults());
requests -> requests.requestMatchers("/", "/home", "/login", "/static/**").permitAll() // // Try to customize the login page
.anyRequest().authenticated() // .formLogin(
); // form -> form.loginPage("/login").successForwardUrl("/")
// )
// .logout(
// form -> form.logoutUrl("/logout").permitAll()
// )
// .authorizeHttpRequests(
// requests -> requests.requestMatchers("/", "/home", "/login**", "/static/**", "/logout**").permitAll()
// .anyRequest().authenticated()
// );
;
return http.build(); return http.build();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册