DotNetOpenAuth - OpenIdProviderMvc 中的 IsReturnUrlDiscoverable 永远不会为 true

发布于 2024-12-03 14:43:39 字数 697 浏览 2 评论 0原文

我正在尝试实现一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇妻 2024-12-10 14:43:39

听起来很可能是两个 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文