@sqrtthree/koa-token
v0.1.0
Published
A token middleware for Koa
Downloads
3
Readme
koa-token
A token middleware for Koa
Install
npm install @sqrtthree/koa-token
Usage
import * as Koa from 'koa'
import { tokenMiddleware } from '@sqrtthree/koa-token'
const app = new Koa()
app.use(
tokenMiddleware({
token: 'target token',
})
)
Options
token: string | () => string | Promise<string>
String or function to get target token.