Authenticate with SAML gives hashed username and e-mail

After more research I found that the ‘hashed’ code in the registration form is actually the NameID send by the IdP. In the configuration of SAML on the IdP I’ve also enabled the following attributes:

  • Display Name: urn:mace:dir:attribute-def:displayName
  • Full Name: urn:mace:dir:attribute-def:cn
  • Email address: urn:mace:dir:attribute-def:mail
  • User ID: urn:mace:dir:attribute-def:uid

It is confirmed by a third party that these attributes are actually send from the IdP. But for some reason the values of these attributes are not used in the registration form of Discourse (as shown earlier). I assumed that in the form:

  • Email would have the value of urn:mace:dir:attribute-def:mail;
  • Username the value of urn:mace:dir:attribute-def:mail and
  • Name either the value of urn:mace:dir:attribute-def:displayName (preferably) or urn:mace:dir:attribute-def:cn

Is there some way I can configure Discourse-SAML to map these attributes right?