1

I need to protect MVC action methods via OAUTH. Ultimately, I think I need to create two action filters - one to parse the OAUTH data and another to send back data with appropriate headers. Unfortunately, I can't find any example of this. Does anyone have pointers or samples they can provide which can get me started?

EDIT - I've already looked at DotNetOpenAuth and the sample they have is for WCF and seems rather complex for this need. I found https://github.com/bittercoder/DevDefined.OAuth and it does seem promising. Hopefully, others have found additional userful resources.

AlexGad
  • 6,612
  • 5
  • 33
  • 45
  • 2
    Did you look at [DotNetOpenAuth](http://www.dotnetopenauth.net/)? It contains numerous examples that are worth checking if you intend to do any OAuth with ASP.NET. – Darin Dimitrov Sep 24 '11 at 15:21
  • generally what you're talking about is setting up authentication through oauth; where by you say a session is a certain user and fill in some other info for them. – Will Charczuk Sep 24 '11 at 15:35
  • Yes, I looked at DotNetOpenAuth and the sample they have for protecting a resource is targeted at WCF and is rather complicated for what I need accomplished (protect an MVC REST action). I am currently looking at https://github.com/bittercoder/DevDefined.OAuth which seems promising. – AlexGad Sep 24 '11 at 17:48
  • >> generally what you're talking about is setting up authentication - actually its authorization not authentication. A service often does not have a sense of a user since its really an application talking to another application and asking if it can execute a particular method/service. – AlexGad Sep 24 '11 at 17:48
  • You asked if I managed to solve my problem at my post: http://stackoverflow.com/questions/7348243/2-legged-oauth-implementation-in-c Is a client side implementation what you need? Or a server side implementation? I managed to solve the client side. – Daniel Sep 26 '11 at 15:58

0 Answers0