Spring authentication based on web security authentication

I am writing a soothing web service that returns json and uses Spring MVC for this. I am using Spring 3.x. Now I want to add a login method that will retrieve the username and password and return an access token so that the client can use this token to call other methods. I think this token should have a finite lifetime. Is there a good sample? Do I need Spring Security for this? And again, a good sample will be greatly appreciated.

+5
source share

All Articles