I am developing an iPhone application and a website simultaneously. I plan on making an API for the website so that the app can send a URL request to get things done. For example, they send a request to www.example.com/journal/add/1 and it will add the item with id 1 to their journal.
What I don’t know, is how to do I authenticate them through the iPhone application? I would like them to login just once and have it save their “session”. Should I just store the username/password in a plist, and then authenticate them every time they make a request (so I would have to send their username and password hash through every request, like www.example.com/journal/add/1/user/hash? Seems hacky.
You can try oauth, or implementing a simple key system, where logged in users get a key to make subsequent requests with, either way you can refer to the facebook, twitter, youtube apis, you can see how they do it, get some ideas from there (they are all pretty similar) though they concentrate on letting external users make the calls, but you can still do something similar…