Skip to content

Process all attribute statements instead of only first #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 9, 2015

Conversation

adalinesimonian
Copy link
Contributor

Given the following SAML assertion

<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" Version="2.0" ID="_a293b185-490e-48ba-a30d-9ff96e9c5b2d" IssueInstant="2015-09-24T20:59:14Z">
  <saml2:Issuer>http://stubidp.kentor.se/Metadata</saml2:Issuer>
  <saml2:Subject>
    <saml2:NameID>[email protected]</saml2:NameID>
    <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"/>
  </saml2:Subject>
  <saml2:Conditions NotOnOrAfter="2015-09-24T21:01:14Z"/>
  <saml2:AttributeStatement>
    <saml2:Attribute Name="email">
      <saml2:AttributeValue>[email protected]</saml2:AttributeValue>
    </saml2:Attribute>
  </saml2:AttributeStatement>
  <saml2:AttributeStatement>
    <saml2:Attribute Name="uid">
      <saml2:AttributeValue>12345</saml2:AttributeValue>
    </saml2:Attribute>
  </saml2:AttributeStatement>
</saml2:Assertion>

the only processed attribute under the current code would be email.

With this new code, uid would be processed and made available on profile as well.

Formerly, only the first attribute statement would be processed
@gnawhleinad
Copy link
Contributor

We should add a test case to verify this change!

@adalinesimonian
Copy link
Contributor Author

@gnawhleinad Just added a test case.

ploer added a commit that referenced this pull request Oct 9, 2015
Process all attribute statements instead of only first
@ploer ploer merged commit 22711f1 into node-saml:master Oct 9, 2015
@ploer
Copy link
Contributor

ploer commented Oct 9, 2015

Looks good, thanks!

@adalinesimonian adalinesimonian deleted the patch-2 branch October 9, 2015 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants