1.0.3 • Published 3 years ago
@mkhizeryounas/authorizer v1.0.3
Authorizer
This is a authorization library for microservices architecture using JWT
Getting started
npm i @mkhizeryounas/authorizer
Initialize context
const Authorizer = require('@mkhizeryounas/authorizer');
const authorizer = new Authorizer({
url: 'http://localhost:8090/user/',
});
Use in an express route
router.get(
'/protected-route',
authorizer.middleware,
async (res, res, next) => {
res.send('OK');
}
);
Contributing
Feel free to submit pull requests.
Authors
Khizer Younas - Initial work - mkhizeryounas
Licensing
The project is MIT Licenced.