mirror of
https://github.com/honojs/hono.git
synced 2024-12-01 11:51:01 +01:00
.. | ||
index.ts | ||
README.md |
JWT Middleware
Usage
import { Hono } from 'hono'
import { jwt } from 'hono/jwt'
const app = new Hono()
app.use(
'/auth/*',
jwt({
secret: 'it-is-very-secret'
})
)
app.get('/auth/page', (c) => {
return c.text('You are authorized')
})
app.fire()