You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello I'm trying to use this module in my expressjs application however after some testing I can seen to get the module to authenticate users below is some working code from the standalone active directory module which does authenticate followed by the passports code which does not. I'm sending the username and passport via a html form / post request to the /login page.
Working for authentication
var passport = require('passport')
var ActiveDirectoryStrategy = require('passport-activedirectory')
var ActiveDirectory = require('activedirectory')
var ad = new ActiveDirectory({
url: 'ldap://labnet.local',
baseDN: 'DC=labnet,DC=local',
username: '[email protected]',
password: 'password_here'
})
passport.use(new ActiveDirectoryStrategy({
integrated: false,
ldap: ad
}, function (profile, ad, done) {
ad.isUserMemberOf(profile._json.dn, 'AccessGroup', function (err, isMember) {
if (err) return done(err)
return done(null, profile)
})
}))
Hello I'm trying to use this module in my expressjs application however after some testing I can seen to get the module to authenticate users below is some working code from the standalone active directory module which does authenticate followed by the passports code which does not. I'm sending the username and passport via a html form / post request to the /login page.
Working for authentication
Not working in passportjs
any help would be greatly appreciated thanks.
The text was updated successfully, but these errors were encountered: