I will get just one Token, when the Client logging in to the Server.Then I store that in my SQLite database by Client and in the database of server too. When the App running again, just compare the Username+Token (from SQLite database) with Username+Token from database of server (MySQL) , when they are passed, then the User is logging in (the user stay logged in). I use in Eclipse Tomcat Servlet (Jersey).
Sorry for the spelling errors, I can’t speak English.
I will get just one Token, when the Client logging in to the Server.Then
Share
I would just include the token as an HTTP header with every request. You can add a header called “token” (or whatever you want) that your server will get. You can compare it with the one on your server’s database and return an HTTP Unauthorized error if you don’t have that token in the database.