Logout at the end of logout method

Issue: gh-4719
This commit is contained in:
Rob Winch 2017-10-26 19:21:48 -05:00
parent c467dcdbe1
commit 4777a869bc
1 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@
package org.springframework.security.web.server.authentication.logout;
import org.springframework.security.core.context.ReactiveSecurityContextHolder;
import org.springframework.util.Assert;
import reactor.core.publisher.Mono;
@ -68,7 +69,8 @@ public class LogoutWebFilter implements WebFilter {
private Mono<Void> logout(WebFilterExchange webFilterExchange, Authentication authentication) {
return this.serverLogoutHandler.logout(webFilterExchange, authentication)
.then(this.serverLogoutSuccessHandler.onLogoutSuccess(webFilterExchange, authentication));
.then(this.serverLogoutSuccessHandler.onLogoutSuccess(webFilterExchange, authentication))
.subscriberContext(ReactiveSecurityContextHolder.clearContext());
}
/**