Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let adConfig = {
- url:'',
- baseDN: '',
- username: '',
- password: ''
- }
- const ActiveDirectory = require('activedirectory2').promiseWrapper
- , ad = new ActiveDirectory(adConfig)
- module.exports = (params, callback) => {
- ad.authenticate(params.username, params.password).then((auth) => {
- if(auth) {
- // establish a session using express-session
- // return true
- }
- }
- }
Add Comment
Please, Sign In to add comment