DotNetOpenAuth - OpenIdProviderMvc 中的 IsReturnUrlDiscoverable 永远不会为 true
我正在尝试实现一个 OpenId Provider。我正在使用 OpenIdProviderMvc 和 OpenIdRelyingPartyMvc 项目。 OpenIdController::AutoRespondIfPossible() 方法永远不会返回 true。经过调查,我发现 HostProcessRequest.cs::IsReturnUrlDiscoverableCore 永远不会返回成功。具体来说,这一行似乎是问题所在:
if (discoveredReturnToUrl.Contains(this.RequestMessage.ReturnTo)) {
// no need to keep looking after we find a match
return RelyingPartyDiscoveryResult.Success;
}
因为discoveredReturnToUrl是https:///OpenIdRelyingPartyMvc/user/authenticate,
而返回URL是https:///OpenIdRelyingPartyMvc/User/Authenticate?ReturnUrl=Index&dnoa.userSuppliedIdentifier=https %3A%2F%2F%2FOpenIdProviderMvc%2Fuser%2Fbob
这不看起来是对的。您能否确认这是正确的行为还是错误?
I'm trying to implement an OpenId Provider. I'm using the OpenIdProviderMvc and OpenIdRelyingPartyMvc projects.
The OpenIdController::AutoRespondIfPossible() method never returns true. On investigation, I found out that HostProcessRequest.cs::IsReturnUrlDiscoverableCore never returns success. Specifically, this lines seem to be the problem:
if (discoveredReturnToUrl.Contains(this.RequestMessage.ReturnTo)) {
// no need to keep looking after we find a match
return RelyingPartyDiscoveryResult.Success;
}
Because the discoveredReturnToUrl is https:///OpenIdRelyingPartyMvc/user/authenticate
while the return To url is https:///OpenIdRelyingPartyMvc/User/Authenticate?ReturnUrl=Index&dnoa.userSuppliedIdentifier=https%3A%2F%2F%2FOpenIdProviderMvc%2Fuser%2Fbob
This doesn't seem right. Can you confirm this is the right behavior or if this is a bug?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来很可能是两个 URL 之间的大小写差异。
如果您觉得这很愚蠢,请查看 区分大小写的 OpenID URL 检查的情况。
It sounds likely to be the capitalization difference between the two URLs.
And if that seems silly to you, take a look at The case for case sensitive OpenID URL checking.