From 7e57952496b5bfa6030c34550fb6214f629a5383 Mon Sep 17 00:00:00 2001 From: Baptiste Toulemonde <toulemonde@cines.fr> Date: Thu, 15 Jul 2021 15:54:13 +0200 Subject: [PATCH] fix logout path --- .../config/SmartHarvesterSecurityConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/smartharvester/config/SmartHarvesterSecurityConfiguration.java b/src/main/java/com/smartharvester/config/SmartHarvesterSecurityConfiguration.java index cf1a8a2..e9d3a71 100644 --- a/src/main/java/com/smartharvester/config/SmartHarvesterSecurityConfiguration.java +++ b/src/main/java/com/smartharvester/config/SmartHarvesterSecurityConfiguration.java @@ -59,7 +59,7 @@ public class SmartHarvesterSecurityConfiguration extends WebSecurityConfigurerAd .authorizeRequests().antMatchers("/resources/**", "/public/error/css/**").permitAll() .antMatchers("/harvester/api/**").authenticated() .antMatchers("/public/error/css/**").permitAll().and() - .logout().logoutSuccessHandler((req, resp, auth) -> resp.setStatus(HttpServletResponse.SC_OK)); + .logout().logoutUrl("/harvester/auth/logout").logoutSuccessHandler((req, resp, auth) -> resp.setStatus(HttpServletResponse.SC_OK)); http.addFilterBefore(authenticationJwtTokenFilter(), UsernamePasswordAuthenticationFilter.class); } -- GitLab