I am reading the spring-security source code,I am puzzled by this design , why the ProviderManager own / manage a AuthenticationManager parent ?
Comment From: eleftherias
Thanks for reaching out. This is now covered in the Spring Security reference documentation:
ProviderManageralso allows configuring an optional parentAuthenticationManagerwhich is consulted in the event that noAuthenticationProvidercan perform authentication.In fact, multiple
ProviderManagerinstances might share the same parentAuthenticationManager. This is somewhat common in scenarios where there are multipleSecurityFilterChaininstances that have some authentication in common (the shared parentAuthenticationManager), but also different authentication mechanisms (the differentProviderManagerinstances).