@accelerated-software-development/caddy-api-client - v0.2.2
    Preparing search index...

    Function createBasicAuthAccount

    • Create basic auth account configuration for Caddy

      Parameters

      • username: string

        Username for authentication

      • password: string

        Plain text password (will be hashed with bcrypt)

      • Optionaloptions: { rounds?: number; useCaddyCLI?: boolean }

        Optional configuration

      Returns Promise<{ password: string; username: string }>

      Promise resolving to account object with hashed password

      const account = await createBasicAuthAccount("admin", "secret123");
      // Returns: { username: "admin", password: "$2a$10$..." }