Skip to content

BasicAuthUser

Defined in: src/auth/basic.ts:99

A configured user for basicAuth.

Property Type Description Defined in
email? string Email attached to the resulting Principal. src/auth/basic.ts:115
id? string Principal id. Defaults to BasicAuthUser.username when omitted. src/auth/basic.ts:117
password? string A plaintext password. Development only — prefer passwordHash. Compared in constant time but stored as cleartext in your config. src/auth/basic.ts:111
passwordHash? string A digest produced by hashPassword (scrypt$<salt>$<hash>). Preferred for production. src/auth/basic.ts:106
roles? string[] Roles attached to the resulting Principal. src/auth/basic.ts:113
username string The login name, matched against the Basic credentials. src/auth/basic.ts:101