0.0.4 • Published 7 years ago

circe-jwt v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

circe-jwt JWT处理

安装

NPM

使用

import * as Koa from 'koa'
import * as JWT from 'circe-jwt'
import jwt from 'circe-jwt'

const app = new Koa()

app.use(
  jwt({secret: 'JSON_WEB_TOKEN_SECRET'})
    .unless({paths: [/^\/public/]})
)

app.use((async (ctx) => {
  // ctx.state.user
  // JWT.sign()
  // JWT.verify()
  // JWT.decode()
}))

参数

  • secret: string
  • key?: string
0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago