JSONSchema.typeName
Primitive type
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
type typeName = [ | #array | #boolean | #integer | #null | #number | #object | #string]
JSONSchema.typeName
Primitive type
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
type typeName = [ | #array | #boolean | #integer | #null | #number | #object | #string]
HonoJwt.payload
Represents the payload structure for JWT tokens.
type payload = {sub: string, role: string, exp: float}
ArrayAsync.forEachAsync
forEachAsync
is a function that applies an asynchronous function to each element of an array, discarding the results.
@param arr - The input array.
@param fn - An asynchronous function that takes an element and its index as parameters and returns a promise.
@return A promise that resolves when all the promises returned by fn
have been fulfilled.
let forEachAsync: (array<'a>, ('a, int) => promise<unit>) => promise<unit>
HonoBasicAuth.basicAuth
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
let basicAuth: basicAuthOptions => Hono.useHandle