README.md
This file
Path
src/middleware/basic-auth/README.md
26 lines · 333 bytes · Markdown
Last changed by
fix: use `atob` for basic auth (#84)Yusuke Wadabefore adoption4c213e4
History of this fileTake it
fix: use `atob` for basic auth (#84)Yusuke Wadabefore adoption4c213e4
lines 1–26why, one step back1# Basic Auth Middleware23## Usage45index.js:67```js8import { Hono } from 'hono'9import { basicAuth } from 'hono/basic-auth'1011const app = new Hono()1213app.use(14 '/auth/*',15 basicAuth({16 username: 'hono',17 password: 'acoolproject',18 })19)2021app.get('/auth/page', (c) => {22 return c.text('You are authorized')23})2425app.fire()26```