Best Practice/Pattern for iphone login session
I need a recommendation on how to implement a login session for iphone + web service.
Do I generate a token and pass that token every time I mak开发者_StackOverflow中文版e a request to the web service?
- Login
- Get token
Send token to server with every request.
- Token will expire in x-minutes
Would this be a common implementation?
please advise
That sounds like the basic idea. There are of course other options. The RestKit discussion board example does it pretty well:
https://github.com/RestKit/RestKit/tree/master/Examples/RKDiscussionBoardExample/DiscussionBoard
精彩评论