I want my (Java metro) web service with login.
Here's how I plan to do this:
The steps required when calling the webservice method:
- call login (user, pwd), get session token 1.1 remember token
- servicemethod call (token, arg1, arg2 ...)
- webservice checks if a token is known if no exception is thrown, otherwise continue
- logout or timeout after x periods of inactivity
my questions are: 1. What is your opinion on this approach? does that make sense? 2. Are there libraries that take responsibility for processing the session (possibly with saving the database in order to survive application reloading).
(the solution should be simple and convenient for use with Java and .NET clients)
thank!
source
share