-
-
Save thebergamo/5789ef2be39e9c3c2722a32a614777b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ad.findUserAsync(login) | |
.then(function(user){ | |
return ad.authenticateAsync(user.mail, password); | |
}) | |
.then(function(auth){ | |
if(!auth) res.status(403).send({"message": "user not authenticated"}); | |
res.status(200).send({"message": "user authenticated","data": user}); | |
}) | |
.catch(function(err){ | |
return next(err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment