Skip to content

Instantly share code, notes, and snippets.

@sean3z
Created May 29, 2018 23:54
Show Gist options
  • Save sean3z/bc54fcc65475ceab74d4d0a1feac741e to your computer and use it in GitHub Desktop.
Save sean3z/bc54fcc65475ceab74d4d0a1feac741e to your computer and use it in GitHub Desktop.
Restify JWT example
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