2.0.2 • Published 7 years ago

egg-multi-jwt v2.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

egg-multi-jwt

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Egg's JWT authentication plugin which supports multiple JWT.

Install

$ npm i -S egg-multi-jwt

Usage

Enable it with:

// {app_root}/config/plugin.js
exports['multi-jwt'] = {
  enable: true,
  package: 'egg-multi-jwt',
};

Read example in test/fixtures/apps/multi-jwt-test/ for more details.

How To Create A Token

// suppose 'admin' is the key of one jwt
const token = app['multi-jwt']('admin').sign({ foo: 'bar' }, app.config['multi-jwt'].admin.secret);

License

MIT

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago