JWT and JWKS middleware for @lindorm-io/koa applications


License
ISC
Install
npm install @lindorm-io/koa-jwt@0.1.2

Documentation

@lindorm-io/koa-jwt

JWT and JWKS middleware for @lindorm-io/koa applications.

Installation

npm install --save @lindorm-io/koa-jwt

Peer Dependencies

This package has the following peer dependencies:

Usage

JWKS Middleware

koaApp.addMiddleware(jwksMiddleware({
  host: "https://authentication.service/",
  logger: winstonLogger,
  path: "/.well-known/jwks.json",
}));

Token Issuer Middleware

koaApp.addMiddleware(tokenIssuerMiddleware({
  issuer: "https://authentication.service/",
}));

Bearer Token Middleware

koaApp.addMiddleware(bearerTokenMiddleware({
  audience: "access",
  issuer: "https://authentication.service/",
}));