Cleaned up security config file
This commit is contained in:
parent
26f898c37c
commit
d43b1a3e6b
@ -76,17 +76,6 @@ public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
|
||||
// .hasAnyRole("USER", "ADMIN", "SUPER_USER")
|
||||
.authenticated()
|
||||
.and().httpBasic().authenticationEntryPoint(authenticationEntryPoint)
|
||||
// .and()
|
||||
// .logout().invalidateHttpSession(true).clearAuthentication(true)
|
||||
// .logoutRequestMatcher(new AntPathRequestMatcher("/api/perform_logout"))
|
||||
// .logoutSuccessUrl("/").permitAll()
|
||||
// .and()
|
||||
// .formLogin()
|
||||
// .loginProcessingUrl("/api/perform_login").permitAll()
|
||||
// .and()
|
||||
// .formLogin()
|
||||
// .and()
|
||||
// .logout();
|
||||
;
|
||||
|
||||
http.addFilterBefore(tokenFilter, BasicAuthenticationFilter.class);
|
||||
@ -99,15 +88,6 @@ public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
|
||||
|
||||
}
|
||||
|
||||
// @Override
|
||||
// protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// auth.eraseCredentials(false);
|
||||
// }
|
||||
//
|
||||
// public class SecurityWebApplicationInitializer extends AbstractSecurityWebApplicationInitializer {
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ -141,39 +121,9 @@ public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
|
||||
.formLogin().loginPage("/login").permitAll().loginProcessingUrl("/perform_login")
|
||||
.successHandler(loginSuccessHandler).and().logout()
|
||||
.logoutSuccessHandler(logoutSuccessHandler)
|
||||
// .failureUrl("/?login_error")
|
||||
// .and()
|
||||
// .logout().invalidateHttpSession(true)
|
||||
// .clearAuthentication(true)
|
||||
// .logoutRequestMatcher(new AntPathRequestMatcher("/perform_logout"))
|
||||
// .logoutSuccessUrl("/").permitAll()
|
||||
// .and().httpBasic();
|
||||
// .and().cors()
|
||||
// .and().csrf().disable();
|
||||
;
|
||||
// httpSecurity
|
||||
// .csrf().disable()
|
||||
// .authorizeRequests().antMatchers("login").permitAll()
|
||||
// .anyRequest().authenticated()
|
||||
// .and()
|
||||
// .formLogin()
|
||||
// .loginPage("/login").permitAll()
|
||||
// .and()
|
||||
// .logout().invalidateHttpSession(true)
|
||||
// .clearAuthentication(true)
|
||||
// .logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
|
||||
// .logoutSuccessUrl("/").permitAll();
|
||||
}
|
||||
// @Override
|
||||
// protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// auth.eraseCredentials(false);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// @Override
|
||||
// protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// auth.eraseCredentials(false);
|
||||
// }
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user