{
  "repo": "tidbcloud/mimir",
  "binary": "oauth2",
  "binary_path": "cmd/oauth2/main.go",
  "dependencies": {
    "OAuth2HTTP.POSTLogin": {
      "infrastructure": {},
      "services": []
    },
    "OAuth2HTTP.POSTLoginCode": {
      "infrastructure": {
        "kubernetes_api": {
          "conditions": [
            "Always after OAuth code exchange succeeds"
          ],
          "operations": [
            {
              "operation": "CREATE_OR_GET",
              "trigger": "Provision or fetch the client certificate resources for the authenticated user",
              "conditions": [
                "Always when login code exchange succeeds"
              ],
              "implementation": "The handler provisions or reads client certificates through the Kubernetes API and cert-manager resources."
            }
          ]
        }
      },
      "services": [
        {
          "name": "auth0",
          "target_interface": "GET /userinfo",
          "operation_type": "https_client",
          "target_repo": "external",
          "conditions": [
            "Always after OAuth code exchange succeeds"
          ],
          "operations": [
            {
              "operation": "GET",
              "trigger": "Fetch the authenticated user profile from Auth0",
              "conditions": [
                "Always"
              ],
              "implementation": "The handler exchanges the OAuth code and then fetches the authenticated user profile from Auth0."
            }
          ]
        }
      ]
    },
    "OAuth2HTTP.GETCallback": {
      "infrastructure": {},
      "services": []
    }
  }
}
