I am using spring security in my project and I do aware that the provided interface UserDetailsService
is just like the normal interfaces we wrote, but I want to know is there any special purpose behind that the Spring people provide this interface containing single method?
What I observed that, we pass the Implementation class to the method userDetailsService()
of AuthenticationBuilderManager
, so we do not need to bother to invoke service explicitly in the controller.
Apart from this is there any other benefits ?