Skip to content

inconsistency in attribute naming #76

@norfas

Description

@norfas

There is an inconsistency in attribute naming in \dk.nita.saml20\dk.nita.saml20\Profiles\DKSaml20\Attributes.
Some attributes are named in what I assume is a "BASIC" naming format, for example:

    public class DKSaml20CvrNumberAttribute : DKSaml20Attribute
    {
        /// <summary>
        /// Attribute name
        /// </summary>
        public const string NAME = "dk:gov:saml:attribute:CvrNumberIdentifier";

        /// <summary>
        /// Creates an attribute with the specified value.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns></returns>
        public static SamlAttribute Create(string value)
        {
            return Create(NAME, null, value);
        }
    }

But then it sets it to "URI" format in NameFormat property which, I assume, is wrong:

protected static SamlAttribute Create(string name, string friendlyName, string value)
  {
      SamlAttribute att = new SamlAttribute();
      att.NameFormat = SamlAttribute.NAMEFORMAT_URI;

Some other attributes are named in URI format, and this is consistent with att.NameFormat = SamlAttribute.NAMEFORMAT_URI:

{
    /// <summary>
    /// Attribute name
    /// </summary>
    public const string NAME = "https://data.gov.dk/concept/core/nsis/loa";

On top of this, the medatdata file generated requests all attributes in URI format, fx.:
<q1:RequestedAttribute Name="https://data.gov.dk/model/core/eid/professional/cvr" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="true"/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions