diff options
Diffstat (limited to 'lib/web/auth/saml')
-rw-r--r-- | lib/web/auth/saml/index.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/web/auth/saml/index.js b/lib/web/auth/saml/index.js index b8d98340..40a6f8b3 100644 --- a/lib/web/auth/saml/index.js +++ b/lib/web/auth/saml/index.js @@ -6,7 +6,7 @@ const SamlStrategy = require('passport-saml').Strategy const config = require('../../../config') const models = require('../../../models') const logger = require('../../../logger') -const {urlencodedParser} = require('../../utils') +const { urlencodedParser } = require('../../utils') const fs = require('fs') const intersection = function (array1, array2) { return array1.filter((n) => array2.includes(n)) } @@ -17,7 +17,8 @@ passport.use(new SamlStrategy({ entryPoint: config.saml.idpSsoUrl, issuer: config.saml.issuer || config.serverURL, cert: fs.readFileSync(config.saml.idpCert, 'utf-8'), - identifierFormat: config.saml.identifierFormat + identifierFormat: config.saml.identifierFormat, + disableRequestedAuthnContext: config.saml.disableRequestedAuthnContext }, function (user, done) { // check authorization if needed if (config.saml.externalGroups && config.saml.groupAttribute) { @@ -61,11 +62,11 @@ passport.use(new SamlStrategy({ } if (needSave) { user.save().then(function () { - if (config.debug) { logger.debug('user login: ' + user.id) } + logger.debug(`user login: ${user.id}`) return done(null, user) }) } else { - if (config.debug) { logger.debug('user login: ' + user.id) } + logger.debug(`user login: ${user.id}`) return done(null, user) } } |