Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Web API with DotNetOpenAuth

I am building RESTful web API for my ASP.NET MVC4 web application using ASP.NET WebAPI. I want to use OAuth 1.0 to provide authorization. I'm looking toward of DotNetOpenAuth library. Can anyone help me to understand how to use the service provider of this library with ASP.NET WebAPI?

like image 529
ebashmakov Avatar asked Apr 13 '12 11:04

ebashmakov


2 Answers

I'm in a similar situation as you.
I would recommend you to take a look at Thinktecture's IdentityModel Authorization extensions for Web API (and MVC).
It's a open source project hosted on GitHub, with samples to take a look at as well.

You can also grab a lot of useful info from Dominick Baier's blog

like image 157
Magnus Johansson Avatar answered Nov 12 '22 19:11

Magnus Johansson


Have you looked at the OAuthServiceProvider sample that comes with DotNetOpenAuth? It demonstrates a WCF service that is protected by OAuth 1.0.

like image 24
Andrew Arnott Avatar answered Nov 12 '22 21:11

Andrew Arnott