Skip to content

HonoBasicAuth

src/HonoBasicAuth.res
type basicAuthOptions = {username: string, password: string}

Configuration options for basic authentication middleware.

src/HonoBasicAuth.res:4:1


src/HonoBasicAuth.res
let basicAuth: basicAuthOptions => Hono.useHandle

Creates a basic authentication middleware for Hono applications.

This middleware implements HTTP Basic Authentication, requiring clients to provide
valid credentials in the Authorization header to access protected routes.

@param options - The authentication configuration containing username and password
@returns A Hono middleware handler that can be used with the use method

src/HonoBasicAuth.res:11:1


src/HonoBasicAuth.res
let basicAuth: basicAuthOptions => Hono.useHandle

Creates a basic authentication middleware for Hono applications.

This middleware implements HTTP Basic Authentication, requiring clients to provide
valid credentials in the Authorization header to access protected routes.

@param options - The authentication configuration containing username and password
@returns A Hono middleware handler that can be used with the use method

src/HonoBasicAuth.res:32:5