DotNetOpenAuth oAuth in ASP.NET MVC [closed]

拈花ヽ惹草 提交于 2019-12-03 01:56:38

问题


I'm trying to understand how to apply the oAuth consumer library from DotNetOpenAuth in the context of ASP.NET MVC.

oAuth is new to me, and the library doesn't seem very simple. Does anyone have a sample of leveraging this library, for this usage, in ASP.NET MVC?


回答1:


You may want to look at the sample projects that come along with the DotNetOpenAuth source code.

The solution obtained on unzipping has several sample projects in it. One of them is an Oauth consumer implementation. Though it is a ASP.NET Webforms application, reimplementing it as an ASP.NET MVC application shouldn't be too hard.




回答2:


Have a look at Rob Conery's TekPub ASP.Net MVC 2.0 Starter Site. He has setup DotNetOpenAuth as part of that. It should point you in the right direction

EDIT
My assumption was based on the the fact the OpenID and OAuth are the same. They are not the same but complimentary ideas. OpenId is about Authentication where as OAuth is about Authorization.

While not directly related to ASP.NET MVC the TweetSharp Library has an OAuth implementation written in C# that may be of some use.

TweetSharp OAuth workflow
Simple OAuth integration for Twitter in ASP.NET MVC

OAuth with Silverlight for Windows Phone 7




回答3:


I've recently created a NuGet package that adds auth with Facebook, Twitter, Google to any ASP.NET MVC 3 page - in a very simple and extensible manner - and it's based on DotNetOpenAuth. Take a look:

https://nuget.org/packages/SimpleSocialAuth.MVC3/

and the source is on github:

https://github.com/rafek/SimpleSocialAuth




回答4:


There are now tutorials online that show how to do this. Here is one: OpenID and OAuth using DotNetOpenAuth in ASP.NET MVC from Random Sparks



来源:https://stackoverflow.com/questions/2909237/dotnetopenauth-oauth-in-asp-net-mvc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!