Skip to content

Instantly share code, notes, and snippets.

@artem-smotrakov
Last active October 10, 2018 14:01
Show Gist options
  • Save artem-smotrakov/3b0a1a1381c5486439d4336e6d2ecefa to your computer and use it in GitHub Desktop.
Save artem-smotrakov/3b0a1a1381c5486439d4336e6d2ecefa to your computer and use it in GitHub Desktop.
Disabling login/logout pages in Spring framework, see more in https://blog.gypsyengineer.com/en/security/tips-configuring-security-rest-api-spring.html
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.logout().disable();
http.formLogin().disable();
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment