Skip to main content

Type Alias: AuthMiddlewareOptions

AuthMiddlewareOptions = object

Defined in: types.ts:32

Properties

allowedOrigins?

optional allowedOrigins?: (string | RegExp | undefined)[]

Defined in: types.ts:42

Optional origin allowlist. Strings are exact-matched; RegExps are tested. Requests without an Origin header are never rejected by this check.


apiToken?

optional apiToken?: ApiTokenOptions

Defined in: types.ts:36


jwt?

optional jwt?: JwtOptions

Defined in: types.ts:35


required?

optional required?: boolean

Defined in: types.ts:47

When true (default), unauthenticated requests receive 401. When false, they pass through with ctx.state.user === undefined.


strategies

strategies: AuthStrategy[]

Defined in: types.ts:34

Ordered list of strategies to attempt. First match wins.


system?

optional system?: SystemOptions

Defined in: types.ts:37