I have a use case to login a user via SAML, then populate the authentication with an existing authentication provider (extends DaoAuthenticationProvider). Looking at ProviderManager code, it calls the parent authentication manager, if the result *is* NULL. What would be the ramifications of calling the parent regardless? After a successful SAML authentication, the SAMLAuthenticationProvider returns an instance of ExpiringUsernameAuthenticationToken which I would then like to populate with authorities from the parent's provider (DaoAuthenticationManager).
Is there a better way of doing this? I would really like to not duplicate the code in the DaoAuthenticationManager which is why I'm considering a custom ProviderManager which will call the parent ProviderManager regardless of whether result is null or not.
Is there a better way of doing this? I would really like to not duplicate the code in the DaoAuthenticationManager which is why I'm considering a custom ProviderManager which will call the parent ProviderManager regardless of whether result is null or not.