diff --git a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java index 17d865d3d7..e4e2381142 100644 --- a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java +++ b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java @@ -753,7 +753,7 @@ public class ServerHttpSecurity { } public LogoutSpec logoutSuccessHandler(ServerLogoutSuccessHandler handler) { - this.logoutWebFilter.setServerLogoutSuccessHandler(handler); + this.logoutWebFilter.setLogoutSuccessHandler(handler); return this; } diff --git a/web/src/main/java/org/springframework/security/web/server/authentication/logout/LogoutWebFilter.java b/web/src/main/java/org/springframework/security/web/server/authentication/logout/LogoutWebFilter.java index 5216157483..96e00c4b9d 100644 --- a/web/src/main/java/org/springframework/security/web/server/authentication/logout/LogoutWebFilter.java +++ b/web/src/main/java/org/springframework/security/web/server/authentication/logout/LogoutWebFilter.java @@ -44,7 +44,7 @@ public class LogoutWebFilter implements WebFilter { private ServerLogoutHandler logoutHandler = new SecurityContextServerLogoutHandler(); - private ServerLogoutSuccessHandler serverLogoutSuccessHandler = new RedirectServerLogoutSuccessHandler(); + private ServerLogoutSuccessHandler logoutSuccessHandler = new RedirectServerLogoutSuccessHandler(); private ServerWebExchangeMatcher requiresLogout = ServerWebExchangeMatchers .pathMatchers(HttpMethod.POST, "/logout"); @@ -70,18 +70,19 @@ public class LogoutWebFilter implements WebFilter { private Mono logout(WebFilterExchange webFilterExchange, Authentication authentication) { return this.logoutHandler.logout(webFilterExchange, authentication) - .then(this.serverLogoutSuccessHandler.onLogoutSuccess(webFilterExchange, authentication)) + .then(this.logoutSuccessHandler + .onLogoutSuccess(webFilterExchange, authentication)) .subscriberContext(ReactiveSecurityContextHolder.clearContext()); } /** * Sets the {@link ServerLogoutSuccessHandler}. The default is {@link RedirectServerLogoutSuccessHandler}. - * @param serverLogoutSuccessHandler the handler to use + * @param logoutSuccessHandler the handler to use */ - public void setServerLogoutSuccessHandler( - ServerLogoutSuccessHandler serverLogoutSuccessHandler) { - Assert.notNull(serverLogoutSuccessHandler, "serverLogoutSuccessHandler cannot be null"); - this.serverLogoutSuccessHandler = serverLogoutSuccessHandler; + public void setLogoutSuccessHandler( + ServerLogoutSuccessHandler logoutSuccessHandler) { + Assert.notNull(logoutSuccessHandler, "logoutSuccessHandler cannot be null"); + this.logoutSuccessHandler = logoutSuccessHandler; } public void setLogoutHandler(ServerLogoutHandler logoutHandler) {