Skip to content

Commit

Permalink
[SHIBUI-1029]
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
jj committed Jan 21, 2019
1 parent 11f1203 commit 418e736
Showing 1 changed file with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,25 @@ protected void configure(HttpSecurity http) throws Exception {
}
}

@Configuration
@Order(1)
public static class StaticSecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.antMatcher("/static.html").authorizeRequests().antMatchers("/static.html").permitAll();
}
}

@Configuration
@Order(2)
public static class ErrorSecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.antMatcher("/error").authorizeRequests().antMatchers("/error").permitAll();
}
}

@Order(100)
public static class Pac4jWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
private final Config config;
private UserRepository userRepository;
Expand All @@ -65,8 +83,6 @@ public Pac4jWebSecurityConfigurerAdapter(final Config config, UserRepository use

@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().antMatchers("/static.html").permitAll();

final SecurityFilter securityFilter = new SecurityFilter(this.config, "Saml2Client");

final CallbackFilter callbackFilter = new CallbackFilter(this.config);
Expand Down

0 comments on commit 418e736

Please sign in to comment.