AuthzProps: PropsWithChildren<{
    fallback?: ReactNode;
    fromResult?: ((_?: Result) => boolean);
    input?: Input;
    loading?: ReactNode;
    path?: string;
}>

Type declaration

  • Optionalfallback?: ReactNode

    Component to display when result is falsey

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

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

      • (_?): boolean
      • Parameters

        Returns boolean

  • Optionalinput?: Input

    Input to the policy evaluation. Will be merged with AuthzProvider's defaultInput (if set), overriding it when in conflict.

  • Optionalloading?: ReactNode

    loading mimics React.Suspense Will display when loading so we have the option to display skeletons instead of the disabled option.

  • Optionalpath?: string

    Path of the policy to evluate. Will default to AuthzProvider's path.