经过进一步研究,我发现注册表单中的“哈希”代码实际上是 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 以正确映射这些属性?