Documentation
    Preparing search index...

    Interface AstroRbacOptions

    Options for configuring AstroRbacMiddleware.

    interface AstroRbacOptions {
        enableTarpitSleep?: boolean;
        forbiddenRedirectPath?: string;
        loginRedirectPath?: string;
        userResolver?: (
            context: AstroLikeContext,
        ) => RbacUserContext | Promise<RbacUserContext | null> | null;
    }
    Index

    Properties

    enableTarpitSleep?: boolean

    Whether to inject tarpit delay asynchronously before proceeding

    forbiddenRedirectPath?: string

    URL path to redirect forbidden users for HTML pages (defaults to "/403")

    loginRedirectPath?: string

    URL path to redirect unauthenticated users for HTML pages (defaults to "/login")

    userResolver?: (
        context: AstroLikeContext,
    ) => RbacUserContext | Promise<RbacUserContext | null> | null

    Custom extractor function to retrieve the user context from Astro context