@allbin/express-jwt-required-claims
v0.0.4
Published
Express route middleware for requiring specific claims
Downloads
8
Readme
@allbin/express-jwt-required-claims
import express from 'express';
import jwt from 'express-jwt';
import claims_required from '@allbin/express-jwt-required-claims';
app = express();
app.get(
'/protected',
jwt({ secret: 'shhhhh' }),
claims_required({
uid: 123,
access: { op: 'bits', value: 1 },
}),
(req, res, next) => {
res.status(200);
},
);
app.listen(8080);