1.0.0 • Published 5 years ago
koa2-jwt-simple v1.0.0
koa2-jwt-simple
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/]
}))
1.0.0
5 years ago