使用 SAML 进行身份验证会提供已加密的用户名和电子邮件

经过进一步研究,我发现注册表单中的“哈希”代码实际上是 IdP 发送的 NameID。在 IdP 的 SAML 配置中,我还启用了以下属性:

  • 显示名称: urn:mace:dir:attribute-def:displayName
  • 全名: urn:mace:dir:attribute-def:cn
  • 电子邮件地址: urn:mace:dir:attribute-def:mail
  • 用户 ID: urn:mace:dir:attribute-def:uid

第三方已确认这些属性确实由 IdP 发送。但出于某种原因,这些属性的值并未在 Discourse 的注册表单中使用(如前所示)。我原本以为在表单中:

  • 电子邮件 应使用 urn:mace:dir:attribute-def:mail 的值;
  • 用户名 应使用 urn:mace:dir:attribute-def:mail 的值;
  • 姓名 应使用 urn:mace:dir:attribute-def:displayName(首选)或 urn:mace:dir:attribute-def:cn 的值。

是否有办法配置 Discourse-SAML 以正确映射这些属性?