Dec. 14, 2023, 7:06 p.m. | Nermin Karapandzic

DEV Community dev.to

If you prefer a version with a better UI: https://coadge.com/posts/spring-security-mutliple-authentication-providers-[new---spring-boot-3+]


In this post we will see how we can have multiple different authentication mechanisms with Spring Security.


When we want our application to support multiple different authentication techniques, we need to have multiple AuthenticationProvider registered with the ProviderManager.


In Spring Security the authentication flow goes like this:



  • Request goes through security filter chain filters where some object of type AuthenticationToken might be constructed

  • This object is then passed along to …

application authentication filter flow goes java object request security spring springboot spring security springsecurity support techniques

QA Customer Response Engineer

@ ORBCOMM | Sterling, VA Office, Sterling, VA, US

Enterprise Security Architect

@ Booz Allen Hamilton | USA, TX, San Antonio (3133 General Hudnell Dr) Client Site

DoD SkillBridge - Systems Security Engineer (Active Duty Military Only)

@ Sierra Nevada Corporation | Dayton, OH - OH OD1

Senior Development Security Analyst (REMOTE)

@ Oracle | United States

Software Engineer - Network Security

@ Cloudflare, Inc. | Remote

Software Engineer, Cryptography Services

@ Robinhood | Toronto, ON