我处于危急情况,因为我们必须将 Google Apps 支持集成到我们的应用程序中,该应用程序位于 .Net 2.0 框架中。所以为此我使用 DotNetOpenId v2.5.7。早些时候,为了实现这一点,我们使用 DotNetOpenAuth v3.4.6 在框架 4.0 中创建了一个单独的应用程序,该应用程序将使用 Google Apps 进行身份验证并将数据重定向回所有信息。但该过程存在安全漏洞。所以现在我们必须使用 DotNetOpenId,因为我们的应用程序无法迁移到更高的框架。
主要问题是与 Google Apps 一起使用时。它适用于其 OpenId 端点为https://www.google.com/accounts/o8/ud的 Gmail 帐户。但是,当 OpenId Endpoint 类似于https://www.google.com/a/example.com/o8/ud?be=o8时,它会给我一个断言错误。应用程序将用户正确重定向到 Google Apps 登录页面。但是当它返回数据时,身份验证状态为失败,以下是其中的异常:
Message: The OpenId Provider issued an assertion for an Identifier whose discovery information did not match.
Assertion endpoint info:
ClaimedIdentifier: http://example.com/openid?id=11......010
ProviderLocalIdentifier: http://example.com/openid?id=11......010
ProviderEndpoint: https://www.google.com/a/example.com/o8/ud?be=o8
OpenID version: 2.0
Service Type URIs: (unavailable)
Discovered endpoint info:
{ClaimedIdentifier: http://specs.openid.net/auth/2.0/identifier_select
ProviderLocalIdentifier: http://specs.openid.net/auth/2.0/identifier_select
ProviderEndpoint: https://www.google.com/a/example.com/o8/ud?be=o8
OpenID version: 2.0
Service Type URIs: http://specs.openid.net/auth/2.0/server, }
我已经放置了一个 XRDS 文件,该文件可以在此位置http://example.com/openid下载,其数据如下
<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
<XRD>
<Service priority="0">
<Type>http://specs.openid.net/auth/2.0/server</Type>
<URI>https://www.google.com/a/example.com/o8/ud?be=o8</URI>
</Service>
<Service priority="10">
<Type>http://specs.openid.net/auth/2.0/signon</Type>
<URI>https://www.google.com/a/example.com/o8/ud?be=o8</URI>
</Service>
</XRD>
</xrds:XRDS>
但这也无济于事。
我还在http://example.com/.well-known/host-meta位置放置了一个文件,其中包含以下内容:
Link: <https://www.google.com/accounts/o8/site-xrds?hd=example.com>; rel="describedby http://reltype.google.com/openid/xrd-op"; type="application/xrds+xml"
请告诉我我还需要做什么。几天以来,我一直在浏览论坛并使用 Google 来解决此问题,但没有任何进展。