Comparing version 0.8.1 to 0.8.2
@@ -153,2 +153,3 @@ | ||
if (err) return callback(err); | ||
encrypted = '<saml:EncryptedAssertion>' + encrypted + '</saml:EncryptedAssertion>'; | ||
callback(null, utils.removeWhitespace(encrypted)); | ||
@@ -155,0 +156,0 @@ }); |
{ | ||
"name": "saml", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"devDependencies": { | ||
@@ -5,0 +5,0 @@ "mocha": "*", |
@@ -147,4 +147,6 @@ var assert = require('assert'), | ||
if (err) return done(err); | ||
var encryptedData = utils.getEncryptedData(encrypted); | ||
xmlenc.decrypt(encrypted, { key: fs.readFileSync(__dirname + '/test-auth0.key')}, function(err, decrypted) { | ||
xmlenc.decrypt(encryptedData.toString(), { key: fs.readFileSync(__dirname + '/test-auth0.key')}, function(err, decrypted) { | ||
if (err) return done(err); | ||
@@ -174,4 +176,6 @@ var isValid = utils.isValidSignature(decrypted, options.cert); | ||
if (err) return done(err); | ||
var encryptedData = utils.getEncryptedData(encrypted); | ||
xmlenc.decrypt(encrypted, { key: fs.readFileSync(__dirname + '/test-auth0.key')}, function(err, decrypted) { | ||
xmlenc.decrypt(encryptedData.toString(), { key: fs.readFileSync(__dirname + '/test-auth0.key')}, function(err, decrypted) { | ||
if (err) return done(err); | ||
@@ -178,0 +182,0 @@ |
@@ -93,1 +93,7 @@ var xmlCrypto = require('xml-crypto'), | ||
}; | ||
exports.getEncryptedData = function(encryptedAssertion) { | ||
var doc = new xmldom.DOMParser().parseFromString(encryptedAssertion); | ||
return doc.documentElement | ||
.getElementsByTagName('xenc:EncryptedData')[0]; | ||
}; |
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
52927
925