问题
I would like to create a site that authenticates using Google's OpenID. How would I do this?
Also, how would I use roles with custom tables?
回答1:
Check out DotNetOpenAuth as a library you can use. You can hard-code https://www.google.com/accounts/o8/id as your OP Identifier to get users to log in using their Google accounts.
You can check out the ASP.NET project template that will get you going, including with ASP.NET role management.
回答2:
Here's a good place to start: http://code.google.com/apis/accounts/docs/OpenID.html
回答3:
Scott Hansleman has a good article on OpenID in ASP.NET
回答4:
Here is the step-by-step process to implement OpenID on your ASP.NET application using DotNetOpenOAuth libraray.
Document describes how to implement Google login into your web application and Third-party web sites and let you aware how OpenID authentication works.
来源:https://stackoverflow.com/questions/2042601/how-to-use-openid-in-asp-net