From 64c457162e69fb7d2774aef35f7b8d397f9842bc Mon Sep 17 00:00:00 2001 From: Oliver Facklam <oliver.facklam@polytechnique.edu> Date: Sat, 2 Mar 2019 17:50:23 +0100 Subject: [PATCH] Correction config_passport.js --- src/config_passport.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config_passport.js b/src/config_passport.js index d8296e5..342634e 100644 --- a/src/config_passport.js +++ b/src/config_passport.js @@ -34,6 +34,8 @@ import passport from 'passport'; import LdapStrategy from 'passport-ldapauth'; import { ldapConfig } from './ldap/internal/config'; +console.log("Configuring passportjs... " + ldapConfig.server + " " + ldapConfig.dn.user); + // specifies options for 'ldapauth' strategy, to customize the behaviour of subsequent passport.authenticate('ldapauth') calls passport.use(new LdapStrategy({ server: { @@ -41,7 +43,7 @@ passport.use(new LdapStrategy({ //bindDn: '.............', //bindCredentials: '..........', searchBase: ldapConfig.dn.user, // this field cannot be left empty. - searchFilter: '(uid={{username}})', // this field cannot be left empty. + searchFilter: '(uid={{username}}*)', // this field cannot be left empty. searchAttributes: ['uid', 'urlPhoto'], // only fetch the uid, no need for any other field //tlsOptions: '..........', //https://www.npmjs.com/package/passport-ldapauth for more -- GitLab