I'm having a problem with using passport-ldap. I just can't seem to get anything other than Bad Request. I've got scripts working in Python and Bash, so I know the information is correct and maybe I'm just not seeing something. Any help would be great.
Here's a condensed version with just the bits necessary.
const passport = require('passport');
const LdapStrategy = require('passport-ldapauth');
var ldapOptions = {
server: {
url: <URL>,
bindDN: 'uid=<username>',
bindCredentials: '<password>',
searchBase: 'ou=Users, ou=Internal, o=<Corporate>,
searchAttributes: ['uid', 'mail', 'displayName'],
searchFilter: 'uid='
}
}
passport.use('ldapauth', new LdapStrategy(ldapOptions));
router.post('/login', passport.authenticate('ldapauth', {session: false}), function(req, res) {
console.log('Hello');
});
Aucun commentaire:
Enregistrer un commentaire