beginnerSpring Security Architecture: The Filter Chain & Internal Flow
What is the role of the AuthenticationManager, and how does ProviderManager fit in?
AuthenticationManager is the single entry-point interface with one method, authenticate(Authentication). ProviderManager is the default implementation: it holds an ordered list of AuthenticationProvider beans and asks each one, in turn, 'can you handle this Authentication type?' — the first provider that supports the type and successfully authenticates wins. If none succeed, a ProviderNotFoundException or AuthenticationException is thrown.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response