I have created Restful API. I am using in here ldap authentication. Our company has ldap directory server and I am using below method as utility in my service layer.
This is my ldap authentication method, which I am using this method as utility in my serivce layer.
This is my service layer class and I am making utility class as injection which can be used authentication method as you know. When I send request in swagger or postman username and password, given the values comes from request, I am persist them into to database of table. but before persist authentication method controls my username and password. if password or username is not correct I return error response to the client otherwise I return success response to the client. both situation I insert given values to the database of table from the request .
Now I don't need to use this method, instead, does spring boot itself have a similar method or any feature, just like the method I showed above?
The same operations will be repeated, but the difference is that I will delete the method I wrote in
java and use the spring boot's ldap security authentication feature instead.