Connectum API Reference / @connectum/auth / AuthzInterceptorOptions
Interface: AuthzInterceptorOptions
Defined in: packages/auth/src/types.ts:244
Authorization interceptor options
Properties
authorize()?
optionalauthorize: (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
Authenticated user context
req
Request info (service and method names)
method
string
service
string
Returns
boolean | Promise<boolean>
true if authorized, false otherwise
defaultPolicy?
optionaldefaultPolicy:AuthzEffect
Defined in: packages/auth/src/types.ts:249
Default policy when no rule matches.
Default
"deny"rules?
optionalrules:AuthzRule[]
Defined in: packages/auth/src/types.ts:255
Declarative authorization rules. Evaluated in order; first matching rule wins.
skipMethods?
optionalskipMethods:string[]
Defined in: packages/auth/src/types.ts:272
Methods to skip authorization for.
Default
[]