Skip to content

chainAuthenticate

function chainAuthenticate(...authenticators): AuthenticateFn;

Defined in: src/http/bearer.ts:112

Chain multiple authenticate callbacks, trying each in order.

Each authenticator is called in sequence. Plain Error (credential rejection) causes the next authenticator to be tried. Error subclasses (TypeError, RangeError, etc.), PermissionError-named errors, and non-Error throws propagate immediately.

Parameter Type
authenticators AuthenticateFn[]

AuthenticateFn

Error if no authenticators are provided.