Commit a4c65aa1 authored by Jason Song's avatar Jason Song Committed by GitHub

Merge pull request #1363 from nobodyiam/portal-logout-url

unify portal logout url to /user/logout
parents faf7d3b4 0196259c
...@@ -251,7 +251,7 @@ public class AuthConfiguration { ...@@ -251,7 +251,7 @@ public class AuthConfiguration {
http.authorizeRequests().antMatchers("/openapi/**", "/vendor/**", "/styles/**", "/scripts/**", "/views/**", "/img/**").permitAll() http.authorizeRequests().antMatchers("/openapi/**", "/vendor/**", "/styles/**", "/scripts/**", "/views/**", "/img/**").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().logoutUrl("/user/logout").invalidateHttpSession(true).clearAuthentication(true).logoutSuccessUrl("/signin?#/logout");
http.exceptionHandling().authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/signin")); http.exceptionHandling().authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/signin"));
} }
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<span class="glyphicon glyphicon-user"></span>&nbsp;{{userName}} <span class="glyphicon glyphicon-user"></span>&nbsp;{{userName}}
<span class="caret"></span></a> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="/logout">退出</a></li> <li><a href="/user/logout">退出</a></li>
</ul> </ul>
</li> </li>
......
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