spring - How Authentication manager verifies Credentials? -
i using spring security in web application.
here have authentication-manager & authentication-provider providing authenticate user details directly or service.
like:
<authentication-manager> <authentication-provider user-service-ref="loginservice" /> </authentication-manager>
how internally performing verifications. verification logic present ?
what going on internally ?
can suggest explanation.
spring security javadoc friend !
authenticationmanager interface. default implementation providermanager
gets list of authenticationprovider
. each authenticationprovider
tried in sequence until 1 can decide authentication credentials proposed.
here, <authentication-provider user-service-ref="loginservice" />
declares daoauthenticationprovider
. daoauthenticationprovider
loads user information userdetailsservice
(here loginservice
) , compares username/password combination values supplied @ login. if fine, populates authenticationtoken
values retrieved loginservice
, passes id authenticationmanager
. if credentials wrong, throws authenticationexception
Comments
Post a Comment