{
  "openapi": "3.1.0",
  "info": {
    "title": "AuthPosture by RungLab — OAuth 2.1, OIDC PKCE, RFC 9728 MCP Auth, Passkey & Session Cookie Auditor",
    "version": "1.0.0",
    "description": "Deterministic 100-point authentication security auditor covering OAuth 2.1 / OIDC PKCE S256 discovery (20 pts), RFC 9728 OAuth Protected Resource & MCP Auth readiness (15 pts), Passkey / WebAuthn & password UX standards (15 pts), Session Cookie & Cross-Origin Isolation (20 pts), Auth Transport & Clickjacking Defense (20 pts), and Anti-Phishing DNS CAA/DMARC/Single SPF (10 pts), plus a $39 6-File Hardening Fix Pack.",
    "contact": {
      "name": "RungLab Support",
      "email": "support@runglab.dev",
      "url": "https://auth.runglab.dev/"
    }
  },
  "servers": [
    {
      "url": "https://auth-api.runglab.dev",
      "description": "AuthPosture Edge Audit Worker"
    },
    {
      "url": "https://api.runglab.dev",
      "description": "RungLab Checkout, Lead & Funnel Telemetry API"
    }
  ],
  "paths": {
    "/api/audit": {
      "get": {
        "operationId": "auditAuthPostureUrl",
        "summary": "Audit a live public domain or URL for OAuth 2.1, Passkey, Session Cookie & Anti-Phishing DNS security",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public website URL or domain to audit (e.g. https://github.com)",
            "schema": { "type": "string", "example": "https://github.com" }
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "description": "Set to 1 to bypass the 600s edge cache",
            "schema": { "type": "string", "enum": ["0", "1"] }
          }
        ],
        "responses": {
          "200": {
            "description": "100-point AuthPosture audit report with 6 deterministic checks, findings AUTH-001..AUTH-016, and beforeAfterUplift for the $39 Hardening Fix Pack"
          },
          "400": { "description": "Invalid target URL" },
          "422": { "description": "Blocked by SSRF policy" }
        }
      },
      "post": {
        "operationId": "auditAuthPostureUrlPost",
        "summary": "Audit a live public domain or URL via JSON POST { url }",
        "responses": {
          "200": { "description": "100-point AuthPosture audit report" },
          "400": { "description": "Invalid target URL or JSON body" },
          "422": { "description": "Blocked by SSRF policy" }
        }
      }
    },
    "/api/audit-html": {
      "post": {
        "operationId": "auditOfflineAuthArtifacts",
        "summary": "Zero-network offline audit of pasted OIDC/OAuth discovery JSON, RFC 9728 metadata, passkey endpoints, raw HTTP headers with Set-Cookie, and login HTML",
        "responses": {
          "200": { "description": "Zero-network 100-point AuthPosture audit report (0 outbound requests)" },
          "400": { "description": "Invalid input JSON or missing artifacts" }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "getAuthPostureHealth",
        "summary": "Verify AuthPosture edge worker health",
        "responses": {
          "200": { "description": "Healthy worker status JSON" }
        }
      }
    }
  }
}
