Created
May 29, 2018 23:54
-
-
Save sean3z/bc54fcc65475ceab74d4d0a1feac741e to your computer and use it in GitHub Desktop.
Restify JWT example
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
const user = require('./lib/user'); | |
app.post('/auth', (req, res, next) => { | |
let {username, password} = req.body; | |
user.authenticate(username, password).then(data => { | |
res.send(data); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment