从 IdentityServer 5 中的 IdP EndSessionEndpoint 检索 "sid" 声明?

Retrieving the "sid" claim from the IdP EndSessionEndpoint in IdentityServer 5?

我有一个使用 Duende IdentityServer 5.0.4 中间件的可用 IdP。

在 Web 应用程序中,我有一个注销 link,它执行 302 重定向到通过发现客户端检索到的 EndSessionEndpoint。

在 IdP 的注销确认页面上,用户可用的声明是:sub、amr、name、idp 和 authtime。 'sid' 声明不可用。

如何指示 EndSessionEndpoint 要求 'sid' 声明?有没有办法从 idsrv cookie 中读取当前用户的 sid 声明?

如有任何提示,我们将不胜感激。我目前明确通过 302 重定向的查询字符串传递 sid 声明作为解决方法,但我想尽快删除它。

谢谢!

PS - 我知道 id_token_hint 参数,但我希望系统提示我的用户 'are you sure you want to logout?' 问题。

原来使用 IIdentityServerInteractionService 中的 GetLogoutContextAsync() 评估 LogoutId 值提供了 SessionId 值。