Skip to content

Connectum API Reference / @connectum/auth / AuthzInterceptorOptions

Interface: AuthzInterceptorOptions

Defined in: packages/auth/src/types.ts:244

Authorization interceptor options

Properties

authorize()?

optional authorize: (context, req) => boolean | Promise<boolean>

Defined in: packages/auth/src/types.ts:266

Programmatic authorization callback. Called after rule evaluation if no rule matched, or always if no rules are defined.

Parameters

context

AuthContext

Authenticated user context

req

Request info (service and method names)

method

string

service

string

Returns

boolean | Promise<boolean>

true if authorized, false otherwise


defaultPolicy?

optional defaultPolicy: AuthzEffect

Defined in: packages/auth/src/types.ts:249

Default policy when no rule matches.

Default

ts
"deny"

rules?

optional rules: AuthzRule[]

Defined in: packages/auth/src/types.ts:255

Declarative authorization rules. Evaluated in order; first matching rule wins.


skipMethods?

optional skipMethods: string[]

Defined in: packages/auth/src/types.ts:272

Methods to skip authorization for.

Default

ts
[]