Skip to content
Snippets Groups Projects
Commit 64c45716 authored by Olivér FACKLAM's avatar Olivér FACKLAM
Browse files

Correction config_passport.js

parent 9ca525a8
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment