SHARE
TWEET

Untitled

a guest Dec 23rd, 2017 151 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let adConfig = {
  2.   url:'',
  3.   baseDN: '',
  4.   username: '',
  5.   password: ''
  6. }
  7.  
  8. const ActiveDirectory = require('activedirectory2').promiseWrapper
  9.       , ad = new ActiveDirectory(adConfig)
  10.  
  11. module.exports = (params, callback) => {
  12.    ad.authenticate(params.username, params.password).then((auth) => {
  13.       if(auth) {
  14.         // establish a session using express-session
  15.         // return true
  16.       }
  17.    }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top