Using only the GET API, I will have the first method that retrieves the unique session identifier.
For example: GET / api? action = auth & username = user & password = hashedpassword Would return a 16 character token that you store on your side, and you need this unique token for each subsequent call.
If the API was executed in PHP, you can use its PHP session processing functions to achieve this goal (it has a timeout / garbage collection). Similar features exist in ASP.NET.
It is vulnerable to re-attack (someone captures or guesses the session identifier), but if you need something simple, this is the way to go. Any non-HTTPS website will be vulnerable in the same way. You can associate a session ID with a user's IP address for added security.
Vincent
source share