In the last few videos, we have spoke about user details, service user details, password encoders,
user details, manager, a lot about it, and we now have an understanding in which scenarios I should
go for user details, service and user details manager and what's the responsibility of password and
code.
But if you look at the spring security architecture, authentication provider is the company that leverages
user detail services and password in order to perform the authentication.
So in the last all videos that we have discussed, we saw that how the call will come to user detail
service implementation like law user by username and password order will be addressed to validate the
password returns.
But what if we have a scenario where you don't want to go with the default way of authentication?
Like I don't want to leave res user detail service or user details manager password.
And I just want to write my own logic based upon my application requirement in such scenarios.
Will do I have an option of customizing the ID provider?
So if we see the spring security internal architecture, as soon as a request has been coming from the
way a filter will intercept that request and it will convert that request strictly payslip request or
request into an authentication object post that that authentication object will be given to the authentication
manager.
Implementation authentication manager will in turn argue that responsibility of validating the user
to authentication provider and ID provider will take help by default from the user details service and
password in order to validate the user.
So this is how the default approach asking security to validate user data.
Of course we have customized user detailed service password encoder asport requirement.
Like I have written my code inside law user by user details.
I also know how to customize, create user update user, delete user and how to leverage different password
encoders that we have like Bakry password.
And so we have done certain kind of customization.
But still we are following the spring security schema or contract like we are not coming completely
out of spring security contract.
So there might be scenarios where you don't want to follow all this thing.
You just wanted to have your way of authentication logic without adhering to this user detail service
are password encoder, whatever you want.
So in such scenarios, we should look at customizing authentication provider component.
So let's try to discuss about authentication provider in detail in this section so that you will get
a clarity once we discuss, will also enhance our application to customize authentication provider component
also to understand about.
Thank you and see you in the next room by.