Guest User

Untitled

a guest
Dec 23rd, 2017
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  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. }
Add Comment
Please, Sign In to add comment