@viaalink/caddy-api-client - v0.10.2
    Preparing search index...

    Variable AuthenticationHandlerSchemaConst

    AuthenticationHandlerSchema: ZodObject<
        {
            handler: ZodLiteral<"authentication">;
            providers: ZodOptional<
                ZodObject<
                    {
                        authorizer: ZodOptional<
                            ZodObject<
                                {
                                    gatekeeper_name: ZodOptional<ZodString>;
                                    route_matcher: ZodOptional<ZodString>;
                                },
                                "strip",
                                ZodTypeAny,
                                { gatekeeper_name?: string; route_matcher?: string },
                                { gatekeeper_name?: string; route_matcher?: string },
                            >,
                        >;
                        http_basic: ZodOptional<
                            ZodObject<
                                {
                                    accounts: ZodOptional<
                                        ZodArray<ZodObject<(...), (...), (...), (...), (...)>, "many">,
                                    >;
                                    hash: ZodOptional<
                                        ZodObject<
                                            { algorithm: ... },
                                            "strip",
                                            ZodTypeAny,
                                            { algorithm?: ... },
                                            { algorithm?: ... },
                                        >,
                                    >;
                                    realm: ZodOptional<ZodString>;
                                },
                                "strip",
                                ZodTypeAny,
                                {
                                    accounts?: { password: ...; username: ... }[];
                                    hash?: { algorithm?: (...) | (...) };
                                    realm?: string;
                                },
                                {
                                    accounts?: { password: ...; username: ... }[];
                                    hash?: { algorithm?: (...) | (...) };
                                    realm?: string;
                                },
                            >,
                        >;
                    },
                    "strip",
                    ZodTypeAny,
                    {
                        authorizer?: { gatekeeper_name?: string; route_matcher?: string };
                        http_basic?: {
                            accounts?: { password: string; username: string }[];
                            hash?: { algorithm?: string };
                            realm?: string;
                        };
                    },
                    {
                        authorizer?: { gatekeeper_name?: string; route_matcher?: string };
                        http_basic?: {
                            accounts?: { password: string; username: string }[];
                            hash?: { algorithm?: string };
                            realm?: string;
                        };
                    },
                >,
            >;
        },
        "strip",
        ZodTypeAny,
        {
            handler: "authentication";
            providers?: {
                authorizer?: { gatekeeper_name?: string; route_matcher?: string };
                http_basic?: {
                    accounts?: { password: string; username: string }[];
                    hash?: { algorithm?: string };
                    realm?: string;
                };
            };
        },
        {
            handler: "authentication";
            providers?: {
                authorizer?: { gatekeeper_name?: string; route_matcher?: string };
                http_basic?: {
                    accounts?: { password: string; username: string }[];
                    hash?: { algorithm?: string };
                    realm?: string;
                };
            };
        },
    > = ...

    Authentication handler schema - HTTP basic auth, or caddy-security's authorizer provider (http.authentication.providers.authorizer), which plugs into this same core handler. Without authorizer here, a route built by buildProtectedRoute() failed the route JSON schema the VS Code extension applies to *.caddy.json.

    const authHandler = AuthenticationHandlerSchema.parse({
    handler: "authentication",
    providers: {
    http_basic: {
    accounts: [{ username: "admin", password: "$2a$..." }],
    realm: "Admin Area",
    },
    },
    });