I stumbled across the same problem while testing the SAML integration and I finally managed to get it to work. With logs enabled, check the content of @attributes, those are the actual keys you need for the mapping and not the friendly name. They correspond to the Name attribute from the XML data. For my case the mapping inside app.yml became:
Probably isnt good place but just to add, you will need email, name, first_name, last_name and uid like Dicourse attribute to be able to use SAML plugin.
def attribute_statements
result = {}
statements =
"name:fullName,name|email:email,mail|first_name:first_name,firstname,firstName|last_name:last_name,lastname,lastName|nickname:screenName"
custom_statements = setting(:attribute_statements)
statements = "#{statements}|#{custom_statements}" if custom_statements.present?
statements
.split("|")
.map do |statement|
attrs = statement.split(":", 2)
next if attrs.count != 2
(result[attrs[0]] ||= []) << attrs[1].split(",")
result[attrs[0]].flatten!
end
result
end
this part of the code (have in mind I am not a Ruby programmer) suggest that you need to map all attributes to your attributes that the system may work … I will try to test that information ( I do have issue at a moment with SAML plugin and try to investigate issues).