使用OpenID的网站身份验证身份验证、网站、OpenID

2023-09-03 10:28:44 作者:枝头花几许

我想在一个新的应用程序中使用ASP.NET 2.0和SQL Server 2005实施的OpenID。

我选择了Twitter,Facebook和谷歌作为潜在的OpenID提供商。

我发现在.NET Twitter的执行情况和我的学习谷歌的OpenID的实施的,但我想确保我的设计(主要是!)完美的。

是我的数据库模式是否正确?我相关的阅读 ProviderOpenID 仅包含一个为空的名称列。我保存 OauthToken 和使用,在每一个请求,以获得他的个人资料和验证的登录。我失去了一些东西?

谁能告诉我,如果有一个开源库为.NET实现OpenID提供商的谷歌吗?我发现下面的教程在谷歌的,但我不明白它是如何工作的。有没有人尝试过​​呢?这是做到这一点的最好方法是什么?

解决方案

Facebook和Twitter是的没有的OpenID提供。看起来你已经找到解决方案,其专有的机制然而。但我只是想澄清它是什么,是不是。

是的,谷歌是一个OpenID提供商。而对于ASP.NET 2.0 DotNetOpenId,你挂,是要走的路海事组织。不介意的维基(这是下跌的时间,但到了现在)。这是新DotNetOpen *验证*库,面向.NET 3.5。因为你的目标.NET 2.0专(这是故意的吗?),你需要去与DotNetOpenId是在谷歌code项目现场(的 HTTP://dotnetopenid.google$c$c.com/ ),而忽略了我们移动的链接,因为这会导致你的.NET 3.5库。你想要的是DotNetOpenId V2.5.5。它配备了告诉你如何得到的OpenID去采样。

请注意,谷歌有几个特点与他们是如何做到的OpenID,最显着的其中之一是输入google.com为OpenID的标识符不工作(目前)。你必须键入较长 https://www.google.com/accounts/o8/id

I'd like to implement OpenID in a new application using ASP.NET 2.0 and SQL Server 2005.

09 实战 利用OAuth 2.0实现一个OpenID Connect用户身份认证协议

I chosen Twitter, Facebook and Google as potential OpenID providers.

I've found the Twitter implementation in .NET and I was studying Google's OpenID implementation, but I want to make sure that my design is (mostly!) flawless.

Is my database schema correct? I've associated a Reader with an ProviderOpenID which contains only a nullable Name column. I store the OauthToken and use that at every request to gain access to his profile and verify the login. Am I missing something?

Can anyone tell me if there is an Open Source Library for the .NET implementation of the OpenID provider for Google? I found the following tutorial on Google but I don't understand how it works. Has anyone tried this? Is this the best way to do this?

解决方案

Facebook and Twitter are not OpenID Providers. It looks like you've already found solutions to their proprietary mechanisms however. But I just wanted to clarify what it is and isn't.

Yes, Google is an OpenID Provider. And for ASP.NET 2.0 DotNetOpenId, which you linked to, is the way to go IMO. Don't mind the wiki (which was down at the time but is up now). That's to the new DotNetOpen*Auth* library which targets .NET 3.5. Since you're targeting .NET 2.0 specifically (is this intentional?) you need to go with the DotNetOpenId that is on the Google Code project site (http://dotnetopenid.googlecode.com/) and ignore the "We've Moved" link, since that leads you to the .NET 3.5 library. What you want is DotNetOpenId v2.5.5. It comes with samples that show you how to get OpenID going.

Note that Google has a few peculiarities with how they do OpenID, the most notable of which is that typing "google.com" as the openid identifier doesn't work (currently). You have to type the longer https://www.google.com/accounts/o8/id