1.0.3 • Published 3 years ago

@mkhizeryounas/authorizer v1.0.3

Weekly downloads
4
License
ISC
Repository
github
Last release
3 years ago

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.

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago