fix: update saml strategy to use new config options
This commit is contained in:
@@ -10,16 +10,21 @@ const SAMLStrategy = require('passport-saml').Strategy
|
||||
|
||||
module.exports = {
|
||||
init (passport, conf) {
|
||||
let samlConfig = {
|
||||
const samlConfig = {
|
||||
callbackUrl: conf.callbackURL,
|
||||
entryPoint: conf.entryPoint,
|
||||
issuer: conf.issuer,
|
||||
cert = _.split(conf.cert, '|'),
|
||||
signatureAlgorithm: conf.signatureAlgorithm,
|
||||
digestAlgorithm: conf.digestAlgorithm,
|
||||
identifierFormat: conf.identifierFormat,
|
||||
wantAssertionsSigned: conf.wantAssertionsSigned,
|
||||
acceptedClockSkewMs: _.toSafeInteger(conf.acceptedClockSkewMs),
|
||||
disableRequestedAuthnContext: conf.disableRequestedAuthnContext,
|
||||
authnContext: conf.authnContext,
|
||||
racComparison: conf.racComparison,
|
||||
forceAuthn: conf.forceAuthn,
|
||||
passive: conf.passive,
|
||||
providerName: conf.providerName,
|
||||
skipRequestCompression: conf.skipRequestCompression,
|
||||
authnRequestBinding: conf.authnRequestBinding,
|
||||
@@ -28,11 +33,8 @@ module.exports = {
|
||||
if (!_.isEmpty(conf.audience)) {
|
||||
samlConfig.audience = conf.audience
|
||||
}
|
||||
if (!_.isEmpty(conf.cert)) {
|
||||
samlConfig.cert = _.split(conf.cert, '|')
|
||||
}
|
||||
if (!_.isEmpty(conf.privateCert)) {
|
||||
samlConfig.privateCert = conf.privateCert
|
||||
if (!_.isEmpty(conf.privateKey)) {
|
||||
samlConfig.privateKey = conf.privateKey
|
||||
}
|
||||
if (!_.isEmpty(conf.decryptionPvk)) {
|
||||
samlConfig.decryptionPvk = conf.decryptionPvk
|
||||
|
Reference in New Issue
Block a user