Reputation: 1512
I'm working with the OAuth 2.0 for MVC which can be found here:
http://community.codesmithtools.com/CodeSmith_Community/b/tdupont/archive/2011/03/18/oauth-2-0-for-mvc-two-legged-implementation.aspx#comments (this is a link to some light documentation, which has a link to the project download).
I'm trying to figure out how the flow works. It appears to be like this:
This leaves me feeling quite confused on the following points:
I'm new to writing authentication code in general, as you can probably tell. I know I'm missing something here, I just don't know what it is :)
Upvotes: 3
Views: 704
Reputation: 2714
Oauth is used to give a 3th party acces to your program, it's mostly used in api's
.
The RequestToken should not be used to salt usernames, passwords or what so ever. You get a RequestToken from Oauth wich you use when you communicate with the web service. The request token has a 5 minute time span and after that you should request a new token.
The main advantage off using a RequestToken is the seperation of concerns. In the picture only the OAuth2 Authorization Server has to know username and password. The Google UserInfo Service knows about a set of valid tokens for certain actions. In this case requesting account information.
Check this image from google's oauth implementation. I hope this makes it all clear.
Upvotes: 3