micro-jwt-auth
jwt authorization wrapper for Micro
An
Authorization
header with valueBearer MY_TOKEN_HERE
is expected
example
'use strict'
const jwtAuth = require('micro-jwt-auth')
/*
if Authorization Bearer is not present or not valid, return 401
*/
module.exports = jwtAuth('my_jwt_secret')(async(req, res) => {
return "Ciaone!"
})