import type { GatewayAuthConfig, GatewayAuthPayload } from "./types.js"; /** * Simple token-based authentication for the gateway */ export declare class GatewayAuth { private tokens; private mode; private password?; private allowTailscale; constructor(config?: GatewayAuthConfig, initialTokens?: string[]); /** * Generate a new authentication token */ generateToken(): string; /** * Validate an authentication token */ validate(auth?: GatewayAuthPayload, tailscaleUser?: string): boolean; /** * Add a token to the valid tokens set */ addToken(token: string): void; /** * Remove a token from the valid tokens set */ revokeToken(token: string): boolean; /** * Get all valid tokens */ getTokens(): string[]; /** * Check if authentication is required */ isAuthRequired(): boolean; setAuthRequired(required: boolean): void; }