1
0
mirror of synced 2026-08-04 17:27:13 +00:00

Add OAuth2LoginAuthenticationWebFilter

This is necessary so that the saving of the authorized client occurs
outside of the ReactiveAuthenticationManager. It will allow for
saving with the ServerWebExchange when ReactiveOAuth2AuthorizedClientRepository
is added.

Issue: gh-5621
This commit is contained in:
Rob Winch
2018-08-01 15:49:34 -05:00
parent dd7925cb63
commit f843da1942
8 changed files with 243 additions and 108 deletions
@@ -103,7 +103,7 @@ public class AuthenticationWebFilter implements WebFilter {
.onAuthenticationFailure(webFilterExchange, e));
}
private Mono<Void> onAuthenticationSuccess(Authentication authentication, WebFilterExchange webFilterExchange) {
protected Mono<Void> onAuthenticationSuccess(Authentication authentication, WebFilterExchange webFilterExchange) {
ServerWebExchange exchange = webFilterExchange.getExchange();
SecurityContextImpl securityContext = new SecurityContextImpl();
securityContext.setAuthentication(authentication);