Skip to content

AuthProvider

Defined in: src/auth/contract.ts:20

Authenticates an incoming web-standard Request.

authenticate(request): Promise<Principal | null>;

Defined in: src/auth/contract.ts:22

Resolve the principal, or null if the request is unauthenticated.

Parameter Type
request Request

Promise<Principal | null>


challenge?(request): Response | undefined;

Defined in: src/auth/contract.ts:27

Optional: build a Response that prompts for credentials (e.g. a 401 with a WWW-Authenticate header). When omitted, the server returns a plain 401.

Parameter Type
request Request

Response | undefined