koa2-jwt-simple

1.0.0 • Public • Published

koa2-jwt-simple

npm version

Install

npm install koa2-jwt-simple

Usage

const Koa = require('koa')
const jwt = require('koa2-jwt-simple')
const app = new Koa()

app.use(jwt({
  secret: '生成token时的密匙',
  error: {
    code: 4008,
    msg: '登录失效'
  }
}).unless({
  path: [/\/api\/register/, /\/api\/login/]
}))

Readme

Keywords

Package Sidebar

Install

npm i koa2-jwt-simple

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.5 kB

Total Files

4

Last publish

Collaborators

  • yxcs