Once a user sends a request it reaches the right authentication filter based on the
authentication mechanism used.
Now it extract the given credentials from the request and then using the supplied
values UsernamePasswordAuthenticationToken is created( the authentication object).
Then it calls ‘authenticate’ method of the Authentication Manager.
The request then passes to Authentication Provider and the Authentication Provider
contains an implementation of UserDetailsService.
Spring loads the user information in UserDetailsService by calling loadbyuserName
and compares the username/password combination with the credentials supplied at login.