Connectum API Reference / @connectum/auth / ProtoAuthzInterceptorOptions
Interface: ProtoAuthzInterceptorOptions
Defined in: packages/auth/src/types.ts:368
Proto-based authorization interceptor options.
Uses proto custom options (connectum.auth.v1) for declarative authorization rules defined in .proto files. Falls back to programmatic rules and callbacks.
Properties
authorize()?
optionalauthorize: (context,req) =>boolean|Promise<boolean>
Defined in: packages/auth/src/types.ts:387
Programmatic authorization callback. Called when neither proto options nor programmatic rules match.
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:373
Default policy when no proto option and no rule match.
Default
"deny"rules?
optionalrules:AuthzRule[]
Defined in: packages/auth/src/types.ts:378
Additional programmatic rules, evaluated after proto options. Rules are evaluated in order; first matching rule wins.
