@boxyhq/saml20
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -148,2 +148,13 @@ "use strict"; | ||
xml = xmlBeautify(xml); | ||
const statusValue = xml.Response && | ||
xml.Response.Status && | ||
xml.Response.Status.StatusCode && | ||
xml.Response.Status.StatusCode['@'] && | ||
xml.Response.Status.StatusCode['@'].Value; | ||
const statusParts = statusValue ? statusValue.split(':') : statusValue; | ||
const status = statusParts | ||
? statusParts.length > 0 | ||
? statusParts[statusParts.length - 1] | ||
: undefined | ||
: undefined; | ||
let assertion = xml.Assertion || | ||
@@ -158,2 +169,8 @@ (xml.Response && xml.Response.Assertion) || | ||
} | ||
if (status) { | ||
if (status !== 'Success') { | ||
cb(new Error(`Invalid Status Code (${status}).`)); | ||
return; | ||
} | ||
} | ||
if (!assertion) { | ||
@@ -160,0 +177,0 @@ cb(new Error('Invalid assertion.')); |
{ | ||
"name": "@boxyhq/saml20", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "SAML 2.0 token parser for Node.js", | ||
@@ -49,6 +49,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@xmldom/xmldom": "0.8.2", | ||
"@xmldom/xmldom": "0.8.3", | ||
"@authenio/xml-encryption": "https://github.com/boxyhq/node-xml-encryption#70b915d7dd107f8191a8e671e9b1e59aed0258f4", | ||
"lodash": "4.17.21", | ||
"rambda": "7.2.1", | ||
"rambda": "7.3.0", | ||
"thumbprint": "0.0.1", | ||
@@ -61,8 +61,8 @@ "xml-crypto": "2.1.4", | ||
"@types/chai": "4.3.3", | ||
"@types/mocha": "9.1.1", | ||
"@types/node": "18.7.18", | ||
"@typescript-eslint/eslint-plugin": "5.37.0", | ||
"@typescript-eslint/parser": "5.37.0", | ||
"@types/mocha": "10.0.0", | ||
"@types/node": "18.8.3", | ||
"@typescript-eslint/eslint-plugin": "5.39.0", | ||
"@typescript-eslint/parser": "5.40.0", | ||
"chai": "4.3.6", | ||
"eslint": "8.23.1", | ||
"eslint": "8.25.0", | ||
"eslint-config-prettier": "8.5.0", | ||
@@ -76,5 +76,5 @@ "husky": "8.0.1", | ||
"tsconfig-paths": "4.1.0", | ||
"typescript": "4.8.3" | ||
"typescript": "4.8.4" | ||
}, | ||
"readmeFilename": "README.md" | ||
} | ||
} |
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
42468
869
+ Added@xmldom/xmldom@0.8.3(transitive)
+ Addedrambda@7.3.0(transitive)
- Removed@xmldom/xmldom@0.8.2(transitive)
- Removedrambda@7.2.1(transitive)
Updated@xmldom/xmldom@0.8.3
Updatedrambda@7.3.0