Commit ce521b2a by Jason Song Committed by GitHub

Merge pull request #793 from zhouliang815/master

fix portal spring security config init bug
parents fbc41783 ea77e45b
...@@ -248,9 +248,8 @@ public class AuthConfiguration { ...@@ -248,9 +248,8 @@ public class AuthConfiguration {
protected void configure(HttpSecurity http) throws Exception { protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable(); http.csrf().disable();
http.headers().frameOptions().sameOrigin(); http.headers().frameOptions().sameOrigin();
http.authorizeRequests() http.authorizeRequests().antMatchers("/openapi/**", "/vendor/**", "/styles/**", "/scripts/**", "/views/**", "/img/**").permitAll()
.antMatchers("/openapi/*").permitAll() .antMatchers("/**").hasAnyRole(USER_ROLE);
.antMatchers("/*").hasAnyRole(USER_ROLE);
http.formLogin().loginPage("/signin").permitAll().failureUrl("/signin?#/error").and().httpBasic(); http.formLogin().loginPage("/signin").permitAll().failureUrl("/signin?#/error").and().httpBasic();
http.logout().invalidateHttpSession(true).clearAuthentication(true).logoutSuccessUrl("/signin?#/logout"); http.logout().invalidateHttpSession(true).clearAuthentication(true).logoutSuccessUrl("/signin?#/logout");
http.exceptionHandling().authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/signin")); http.exceptionHandling().authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/signin"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment