Reputation: 1200
I have been exploring OAuth version 1.0 for the REST API I am currently working on.
I have 3 authentication scenarios
Using this scenarios? how can I implement Oauth neatly and how can this help me understand the 3-legged and 2-legged Oauth processes?
Upvotes: 5
Views: 2325
Reputation: 957
Number 1: Correct, just use the typical 3-legged oauth flow.
Number 2. 2-legged oauth is pretty much the same as http-basic, except that the oauth signature gives you protection agains MITM attacks (but if you use http-basic over TLS than you get the same protection). The process for 2-legged oauth is just the signing of the request with the consumer key/secret which is synonymous with a username/password over http basic.
Number 3. I'm not 100% clear on what you mean here, but it sounds similar to how google uses 2-legged oauth for google apps domains. Take a look at their documentation here: https://developers.google.com/accounts/docs/OAuth#GoogleAppsOAuth
Have you looked into OAuth 2.0? It's still in draft, but it has a lot more flexibility for different scenarios. May be something to consider. http://oauth.net/2/
Upvotes: 1