AuthzProviderContext: {
    defaultFromResult?: ((_?: Result) => boolean);
    defaultInput?: {
        [k: string]: any;
    };
    defaultPath?: string;
    opaClient: OPAClient;
    queryClient: QueryClient;
}

Type declaration

  • OptionaldefaultFromResult?: ((_?: Result) => boolean)

    The default function to apply to the policy evaluation result to get a boolean decision. It can be overridden from Authz and useAuthz. If unset, any non-undefined, non-false (i.e. "truthy") result will be taken to mean "authorized".

      • (_?): boolean
      • Parameters

        Returns boolean

  • OptionaldefaultInput?: {
        [k: string]: any;
    }

    Default input for every decision, merged with any passed-in input. Use the latter to override the defaults.

    • [k: string]: any
  • OptionaldefaultPath?: string

    Default path for every decision. Override by providingpath.

  • opaClient: OPAClient

    The @styra/opa OPAClient instance to use.

  • queryClient: QueryClient

    The @tanstack/react-query client that's used for scheduling policy evaluation requests.