title: Implementing Custom Authentication in Spring Security
body: <p>I would like to ask for your help regarding my problem in Spring Security.
  I have a requirement wherein I have to validate a login credential based on the option selected by the user. Option 1 would be validating the logged in user via third party service. Option 2 would be the normal validation using database authentication level. How can I implement this? </p>