我使用來自DotNetOpenAuth.net的示例代碼成爲我自己的OpenID提供程序(OpenIDProviderWebForm)一切正常,我能夠測試我的OP對NerdDinner。現在我想定製標識符--->OpenID提供程序發出的標識符的發現信息不匹配
http://www.mydomain.com/user.aspx/Hash(Username+PrivateKey)~Username。
一切工作的OP側,但在NerdDinner範例程序,當應用程序試圖做
HttpRequestInfo clientResponseInfo =新HttpRequestInfo( 「GET」,權威性,auth.PathAndQuery,頭,空);
響應 = RelyingParty.GetResponse(clientResponseInfo);
(你可以找到在AuthController.cs代碼這兩行從的NerdDinner)
的響應包含以下錯誤:
The OpenID Provider issued an assertion for an Identifier whose discovery information did not match.
Assertion endpoint info:
ClaimedIdentifier: http://localhost:57571/user.aspx/76208371132EC7F7A37472C8B4CC2CC37A05B707~sohail
ProviderLocalIdentifier: http://localhost:57571/user.aspx/76208371132EC7F7A37472C8B4CC2CC37A05B707~sohail
ProviderEndpoint: http://localhost:57571/server.aspx
OpenID version: 2.0
Service Type URIs:
Discovered endpoint info: [
{
ClaimedIdentifier: http://localhost:57571/user.aspx/EA467E35736AC22EB60C04C2E9D9594263B60ECB~sohail
ProviderLocalIdentifier: http://localhost:57571/user.aspx/EA467E35736AC22EB60C04C2E9D9594263B60ECB~sohail
ProviderEndpoint: http://localhost:57571/server.aspx
OpenID version: 2.0
Service Type URIs:
http://specs.openid.net/auth/2.0/signon
http://openid.net/extensions/sreg/1.1
}, {
ClaimedIdentifier: http://localhost:57571/user.aspx/EA467E35736AC22EB60C04C2E9D9594263B60ECB~sohail
ProviderLocalIdentifier: http://localhost:57571/user.aspx/EA467E35736AC22EB60C04C2E9D9594263B60ECB~sohail
ProviderEndpoint: http://localhost:57571/server.aspx
OpenID version: 1.0
Service Type URIs:
http://openid.net/signon/1.0
http://openid.net/extensions/sreg/1.1
},
]
有人能幫助我嗎?
謝謝安德魯,有趣的是,當我使用默認格式:(http://www.mydomain.com/user.aspx/Username)。我看到'response = RelyingParty.GetResponse(clientResponseInfo)';'調用server.aspx頁面,但當我將其更改爲自定義格式'response = RelyingParty.GetResponse(clientResponseInfo);'永遠不會調用我的server.aspx頁面。我沒有改變任何東西! – Sohail
我修好了:)再次感謝 – Sohail