Cerbos JavaScript SDK
    Preparing search index...

    Interface CerbosProviderProps

    Props for the CerbosProvider component.

    interface CerbosProviderProps {
        auxData?: Pick<AuxData, "jwt">;
        children: ReactNode;
        client: Client;
        principal: Principal;
    }
    Index

    Properties

    auxData?: Pick<AuxData, "jwt">

    Auxiliary data related to the principal.

    You can read claims directly from a JWT in your authorization policies by configuring the Cerbos policy decision point (PDP) service or an embedded PDP client to decode the token.

    children: ReactNode

    Your application's component tree.

    client: Client

    The Cerbos client to provide.

    principal: Principal

    The principal to check.

    This is required, but can describe an anonymous user so that you can perform permission checks for unauthenticated users.