From d2e696418cec156c6b3ff01bf5e44d7556f5cb4c Mon Sep 17 00:00:00 2001 From: hinerman Date: Fri, 13 Aug 2021 13:47:56 -0400 Subject: [PATCH] Add organization option in query params --- lib/passport-wsfed-saml2/samlp.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/passport-wsfed-saml2/samlp.js b/lib/passport-wsfed-saml2/samlp.js index 3683b2c..7088127 100644 --- a/lib/passport-wsfed-saml2/samlp.js +++ b/lib/passport-wsfed-saml2/samlp.js @@ -180,6 +180,10 @@ Samlp.prototype = { RelayState: options.RelayState || (parsedUrl.query && parsedUrl.query.RelayState) || '' }; + if (options.organization) { + params.organization = options.organization; + } + if (options.protocolBinding === BINDINGS.HTTP_POST || !options.deflate) { // HTTP-POST or HTTP-Redirect without deflate encoding if (options.signingKey) { @@ -325,8 +329,8 @@ Samlp.prototype = { return done(new Error('Assertion is encrypted. Please set options.decryptionKey with your decryption private key.')); } - return xmlenc.decrypt(encryptedData, { - key: this.options.decryptionKey, + return xmlenc.decrypt(encryptedData, { + key: this.options.decryptionKey, autopadding: this.options.autopadding, disallowDecryptionWithInsecureAlgorithm: false, warnInsecureAlgorithm: false