【发布时间】:2021-12-11 09:19:46
【问题描述】:
我已将 IdentityServer 3 配置为使用指向 AAD 的外部 IdentityProvider。
截至目前,当我向IdentityServer 发送请求时,我被正确重定向到 AAD 进行登录,但是,我发送到 IdentityServer 的“状态”参数被覆盖,OpenIdConnect.AuthenticationProperties 的值被加密并作为查询字符串中的状态发送到 AAD。
例如:
https://localhost:44333/idpaad/connect/authorize?client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&redirect_uri=https://localhost:44394/&response_mode=query&response_type=code&scope=openid%20email&state=9b0e82c3-e623-42f1-bede-493243c103e7
这里,
https://localhost:44333/idpaad/connect/authorize -> IdentityServer 端点
state=9b0e82c3-e623-42f1-bede-493243c103e7 -> 客户端生成的 GUID 作为查询字符串发送。
当我在 IdentityServer OpenIdConnectAuthenticationNotifications 的 StartUp.cs 中看到“RedirectToIdentityProvider”中间件时,状态的值更新为
OpenIdConnect.AuthenticationProperties=(protected values) 而不是 GUID,并且它也作为查询字符串返回给重定向 URI。
enter image description here
有没有办法发送原始状态而不被 IdentityServer3 覆盖?
在使用 wsFederation 时,我没有遇到此问题,并且该问题直接转发给 IdP。
非常感谢任何帮助。
【问题讨论】:
标签: asp.net authentication azure-active-directory openid-connect identityserver3