how to start using openID in an asp.net mvc3 project?
I want to have authentication mechanism fo开发者_如何学Cr my site (in asp.net mvc3), first option openID another option via my site. I don't know how to start with dotnetopenid, because it does not have a good document or some guidance to start with it. Is there any visual document or any useful step by step resource for it. The other question: I want to have google and yahoo openID authentication, is there any difference for using both of them?!
tanks a lot for your suggestions
You could do worse than download the ASP.NET MVC 2 OpenID web site (C#) template from the Visual Studio Gallery.
A C# ASP.NET MVC project template to get you on a strong start on a web site that accepts OpenID. An OAuth service provider is also included so that clients can access user data with user authorization and without a password.
There is also a templated called Html5-MVC3-BP-OpenAuth which is described as:
This template creates an MVC3 Razor project with Html5 Boilerplate from Paul Irish. Also includes the DotNetOpenAuth CTP for authentication via OpenId, Twitter (OAuth) or Facebook (OAuth2).
Alternately check out MvcOpenID - An OpenID Starter Kit for ASP.NET MVC on Codeplex:
"MvcOpenID is an OpenID starter kit for ASP.NET MVC. It is first and foremost a learning tool. I've learned a lot about OpenID while developing this and commented the code a lot. Running the application and stepping through the code is the best and probably the fastest way to learn. Apart from it's educational value you can also use it as a starter kit for your ASP.NET MVC based web applications."
It was a few years ago, but I integrated DotNetOpenId in my blog:
http://blog.dantup.com/2009/04/using-openid-in-your-aspnet-mvc.html
It was pretty painless, and all the required code is on that page. It seems that StackOverflow also uses the same library:
Best OpenId API for ASP.NET MVC application
Additionally you might want to checks Dominick Baier blog posts here and here on the subject.
精彩评论