Closed SwapnilShahGit closed 5 months ago
Thanks for the PR. Unfortunately the SAML treatment of attribute values is a bit more complicated. The base part of the spec is section 2.7.3.1.1 in the SAML core spec, which includes how null and empty values are handled.
The TLDR (although I do recommend reading the spec):
<AttributeValue />
represents an empty string.null
value is represented by <AttributeValue xsi:nil=\"1\" />
(1
or true
are both allowed)The SAML Attribute Profiles (section 8, profile spec) contains even more rules, but as the main focus right now is the Web SSO Profile (and possibly Single Logout) I think we can ignore the profile spec for now.
This PR adds test cases for reading attributes in a SAML document. Alongside, there is a null check added in the code such that an attribute will not be populated if no value is specified.