コンテンツにスキップ
日本語

BasicAuthOptionsType

このコンテンツはまだ日本語訳がありません。

BasicAuthOptionsType = object

Defined in: src/http/middleware/BasicAuthOptions.ts:5

Plain settings shape for HTTP Basic auth. Provide users OR validate.

readonly optional realm?: string

Defined in: src/http/middleware/BasicAuthOptions.ts:11

Realm advertised in WWW-Authenticate on 401. Default 'actor-ts'.


readonly optional users?: Readonly<Record<string, string>>

Defined in: src/http/middleware/BasicAuthOptions.ts:7

username→password map (constant-time compared).


readonly optional validate?: (user, pass) => boolean | Promise<boolean>

Defined in: src/http/middleware/BasicAuthOptions.ts:9

Custom credential check (e.g. against a store).

string

string

boolean | Promise<boolean>