0
0
mirror of https://github.com/honojs/hono.git synced 2024-12-01 11:51:01 +01:00
hono/deno_dist/middleware/jwt
2022-07-02 22:31:10 +09:00
..
index.ts feat: support Deno! (#336) 2022-07-02 15:09:45 +09:00
README.md feat: support Deno! (#336) 2022-07-02 15:09:45 +09:00

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()