hemera-jwt-auth

6.0.2 • Public • Published

Hemera-jwt-auth package

Granting and authenticating solution with JWT for Hemera

npm styled with prettier

Usage

const hemera = new Hemera(nats)
hemera.use(require('hemera-jwt'), {
  enforceAuth: true // set to false if you want to enable it selectively
  jwt: {
    secret: '<secret>'
  }
})

JWT Payload signature

  • scope: Defines a set of rights (Array<string> or string)
{ "scope": ["math"] }

Example

For a full example see here

Plugin decorators

  • .jwtErrors

Readme

Keywords

none

Package Sidebar

Install

npm i hemera-jwt-auth

Weekly Downloads

19

Version

6.0.2

License

MIT

Unpacked Size

4.17 kB

Total Files

5

Last publish

Collaborators

  • starptech