2013-02-11 66 views
1

我正在建立一个网站,来自组织的人员将使用其组织提供的Google Apps帐户登录。该网站使用DotNetOpenAuth的标准OpenID示例代码对Google OpenID提供商进行身份验证。Google Apps OpenID端点提供了错误,但带有Google Apps帐户的标准Google端点可以发挥作用 - 有哪些功能?

OpenID是在这个谷歌Apps域启用,但是当我试图通过https://google.com/accounts/o8/site-xrds?hd=domain.com端点认证用户,我得到以下错误:

Error occurred while sending a direct message or getting the response.

然而,如果我用标准https://www.google.com/accounts/o8/id端点使用我的Google Apps帐户登录,它可以正常工作!

为什么Google Apps帐户产生两个不同的结果:一个端点有效,另一个端点无法正确认证?

回答

1

Google Apps没有完全遵循OpenID 2.0协议。它有一个专有的发现机制,DotNetOpenAuth默认没有打开。在OpenIdRelyingPartyWebForms项目的loginGoogleApps.aspx文件中检出the sample from SourceForge。您会看到它的代码隐藏功能将Google Apps发现功能添加到OpenIdRelyingParty类中。如果你这样做,我认为它也适用于你。

相关问题