Last active
January 22, 2018 10:59
-
-
Save sw-samuraj/4a2819e4ad4af9edd3584c8f3983527c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebSecurity | |
public class SecurityConfiguration extends WebSecurityConfigurerAdapter { | |
@Override | |
protected void configure(HttpSecurity http) throws Exception { | |
http.csrf() | |
.disable(); | |
http | |
.addFilterBefore(metadataGeneratorFilter(), ChannelProcessingFilter.class) | |
.addFilterAfter(samlFilter(), BasicAuthenticationFilter.class); | |
http.authorizeRequests() | |
.antMatchers("/") | |
.permitAll() | |
.antMatchers("/user") | |
.authenticated().and() | |
.formLogin() | |
.loginPage("/saml/login"); | |
http.logout() | |
.logoutSuccessUrl("/"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment