Saturday, 15 March 2014

java - Spring security and UserDetailsService -



java - Spring security and UserDetailsService -

i new spring security , trying implement custom userdetailsservice authentication. bothers me, interface contains 1 method loaduserbyusername(string username) takes username parameter , returns userdetails.

i wondering why method not take password parameter.

how spring managed authenticate user based on username?

i new spring security , clarification on api , authentication process in spring security welcome.

it not job of userdetailsservice authenticate user. responsibility of authenticationprovider.

for illustration daoauthenticationprovider uses userdetailsservice load user username , verifies usernamepasswordauthenticationtoken against user see if passwords match.

have @ source code of daoauthenticationprovider thought of how done behind scenes.

java spring spring-security

No comments:

Post a Comment