@boxyhq/saml20
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -12,2 +12,3 @@ "use strict"; | ||
const surnameClaimType = 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname'; | ||
const nameidFormatEmailAddress = 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'; | ||
function getClaims(attributes) { | ||
@@ -79,6 +80,10 @@ const claims = {}; | ||
} | ||
const subjectName = getProp(assertion, 'Subject.NameID'); | ||
const subjectNameObj = getExtendedProp(assertion, 'Subject.NameID'); | ||
const subjectName = subjectNameObj.result; | ||
if (subjectName && !claims[nameIdentifierClaimType]) { | ||
claims[nameIdentifierClaimType] = subjectName; | ||
} | ||
if (subjectName && subjectNameObj.format === nameidFormatEmailAddress && !claims[emailAddressClaimType]) { | ||
claims[emailAddressClaimType] = subjectName; | ||
} | ||
return { | ||
@@ -85,0 +90,0 @@ audience: getProp(assertion, 'Conditions.AudienceRestriction.Audience'), |
{ | ||
"name": "@boxyhq/saml20", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "SAML 2.0 token parser for Node.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47828
991