{
  "repo": "tidbcloud/kube-oidc",
  "binary": "kube-oidc-login",
  "binary_path": "cmd/kube-oidc-login/main.go",
  "dependencies": {
    "HTTP GET /": {
      "infrastructure": {
        "oidc_provider": {
          "conditions": [
            "Always after server startup"
          ],
          "operations": [
            {
              "operation": "Redirect the browser to the provider authorization endpoint",
              "trigger": "User visits the login root path",
              "implementation": "handleIndex creates a state cookie and redirects with oauth2.Config.AuthCodeURL(state); provider endpoints are discovered at startup via fetchProvider"
            }
          ]
        }
      },
      "services": []
    },
    "HTTP GET /login/callback": {
      "infrastructure": {
        "oidc_provider": {
          "conditions": [
            "Always during callback handling"
          ],
          "operations": [
            {
              "operation": "Exchange the authorization code for tokens and extract the id_token",
              "trigger": "Browser returns to the redirect URI with code and state",
              "implementation": "handleCallback calls oauth2.Config.Exchange and then reads token.Extra(\"id_token\")"
            }
          ]
        }
      },
      "services": []
    },
    "HTTP GET /login/dl": {
      "infrastructure": {},
      "services": [
        {
          "name": "kubernetes_api",
          "target_interface": "configured Kubernetes API endpoint embedded in generated kubeconfig",
          "conditions": [
            "Indirectly through generated kubeconfig"
          ],
          "operations": [
            {
              "operation": "Embed the configured Kubernetes API endpoint and optional CA bundle into the downloaded kubeconfig",
              "trigger": "User downloads kubeconfig after login",
              "implementation": "handleDownload renders kubeconfigTmpl with kubernetesEndpoint and kubernetesCABase64 from the parsed config"
            }
          ]
        }
      ]
    }
  }
}
