I know this question asked many times but I did not get answer that I required.
I want link that can help me to create a spring security framework, In which I donot whant login form validation.
It should be done by login RestAPI. I just hit url like-
post request containing username and password and it return json response with sucess or failure status
if sucess I would be able to hit secure API Requests.
Best How To :
I am using spring and spring security since 1 and half year with spring security to develop rest API I use below technique for user authentication Follow below steps
- Allow to access http:// localhost:8080/login for all user
- User will pass username and password in body
- Authenticate user with database entry
- create access token and send back to response
- using this access token user with interact with secure API.
I will provide source code if you need.