JSPM

@hoajs/jwt

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 98
  • Score
    100M100P100Q53973F
  • License MIT

JSON Web Token(JWT) middleware for Hoa.

Package Exports

  • @hoajs/jwt

Readme

@hoajs/jwt

JSON Web Token(JWT) middleware for Hoa.

Installation

$ npm i @hoajs/jwt --save

Quick Start

import { Hoa } from 'hoa'
import { jwt } from '@hoajs/jwt'

const app = new Hoa()
app.use(jwt({ secret: 'shhhh' }))

app.use(async (ctx) => {
  ctx.res.body = `Hello, ${ctx.state.user.name}!`
})

export default app

Documentation

The documentation is available on hoa-js.com

Test (100% coverage)

$ npm test

License

MIT