parseAuthMode (index.ts)

ClawKitchen · integration, auth-mode, config-parsing, plugin-auth, auth

Parses auth mode from config/env; returns plugin API auth settings for OpenClaw integration.

// Source: https://github.com/JIGGAI/ClawKitchen | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
import http from "node:http";
import path from "node:path";
import fs from "node:fs";

import { fileURLToPath } from "node:url";
import { homedir } from "node:os";

// Next is already a dependency of ClawKitchen.
import next from "next";
import { listInstalledPlugins } from "./list-installed-plugins";

type KitchenConfig = {
  enabled?: boolean;
  dev?: boolean;
  host?: string;
  port?: number;
  /**
   * Auth protection mode.
   * - on: require authToken for non-localhost binds
   * - local: allow localhost callers unauthe

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key