I am implementing a web server API for my application, and I got stuck in the process of figuring out what authentication method I should use to authenticate requests by the users (and also by other client applications). I think that I did not really understand what OAuth and other authentication protocols are made for.
I want the authentication to be performed without the intervention of a web browser, entirely from my iPhone app, or another custom third-party client. Is session-based authentication the good way to go here? How does (for example) the Facebook iPhone client authenticates itself with the web API? I don't think it uses OAuth or anything like that, since touch login/authorization form is never displayed. OAuth is, as far as I know, used only for third-party apps. But why is that so? Couldn't the iPhone client be considered a third-party app too?
I am sorry if my questions are vague and unclear, please point me out with the details that are missing and such. Thank you.