Need to make a composite ReactiveAuthenticationManager, for example CompositeReactiveAuthenticationManager, which contains a list of managers. The behavior should be approximately the same as that of ProviderManager - you need to iterate all the managers and use the first of the successful authentications as a result.
Comment From: jzheaux
Have you already tried DelegatingReactiveAuthenticationManager?
Comment From: franticticktick
Yes. DelegatingReactiveAuthenticationManager does not have the behavior that I need, since at the first failed authentication, flux exits. In my case, there are two authentication schemes and I need to iterate over both as in ProviderManager. There is currently no analogue of ProviderManager.
Comment From: jzheaux
I see. I wonder if it would be better to add a property to DelegatingReactiveAuthenticationManager like setContinueOnError. Would that work for you?
Comment From: franticticktick
Yes, I think this solution will work.
Comment From: franticticktick
In general, this idea is good, but it seems to me that it is impossible to implement it in DelegatingReactiveAuthenticationManager. Method authenticate will return the first successful authentication, but the stream will not move further. That is, there can be many delegates in the list and all will be discarded except the first one, which returns a non empty result.
Comment From: franticticktick
If only something like this?
``` @Override
public Mono
**Comment From: jzheaux**
Or, another way:
```java
Flux<ReactiveAuthenticationManager> result = Flux.fromIterable(this.delegates);
Function<ReactiveAuthenticationManager, Mono<Authentication>> logging =
(m) -> m.authenticate(authentication).doOnError(logger::debug);
return ((this.continueOnError) ? result.concatMapDelayError(logging) : result.concatMap(logging)).next();
Comment From: franticticktick
Ok, I have opened a new PR.