{
  "openapi": "3.1.0",
  "info": {
    "title": "Virtneu Auth Business OAuth / OIDC",
    "version": "1.0.0",
    "description": "App/environment-scoped identity login. Separate from backend /v1 session_token APIs and management MCP OAuth. Deployment acceptance is recorded separately; this contract does not assert production rollout. Only identity scopes and the issuer UserInfo audience are supported."
  },
  "servers": [
    {
      "url": "https://boe-auth-api.virtneu.com",
      "description": "BOE API"
    },
    {
      "url": "https://auth-api.virtneu.com",
      "description": "Production API; deploy and accept separately"
    }
  ],
  "paths": {
    "/oidc/{applicationId}/{environment}/.well-known/openid-configuration": {
      "get": {
        "tags": [
          "Business OIDC"
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          }
        ],
        "operationId": "discoverBusinessOidc",
        "security": [],
        "description": "OIDC Discovery using the full, fixed App/environment issuer. No public dynamic registration endpoint is advertised.",
        "responses": {
          "200": {
            "description": "Success. Token, identity and introspection responses use Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "issuer": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    },
                    "authorization_endpoint": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    },
                    "token_endpoint": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    },
                    "userinfo_endpoint": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    },
                    "jwks_uri": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    },
                    "revocation_endpoint": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    },
                    "introspection_endpoint": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    },
                    "response_types_supported": {
                      "const": [
                        "code"
                      ]
                    },
                    "response_modes_supported": {
                      "const": [
                        "query"
                      ]
                    },
                    "grant_types_supported": {
                      "const": [
                        "authorization_code",
                        "refresh_token"
                      ]
                    },
                    "subject_types_supported": {
                      "const": [
                        "public"
                      ]
                    },
                    "id_token_signing_alg_values_supported": {
                      "const": [
                        "ES256"
                      ]
                    },
                    "scopes_supported": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 4,
                      "uniqueItems": true,
                      "items": {
                        "enum": [
                          "openid",
                          "profile",
                          "email",
                          "offline_access"
                        ]
                      },
                      "description": "Must include openid. Only these identity scopes are supported."
                    },
                    "token_endpoint_auth_methods_supported": {
                      "const": [
                        "none",
                        "client_secret_basic"
                      ]
                    },
                    "introspection_endpoint_auth_methods_supported": {
                      "const": [
                        "client_secret_basic"
                      ]
                    },
                    "revocation_endpoint_auth_methods_supported": {
                      "const": [
                        "none",
                        "client_secret_basic"
                      ]
                    },
                    "code_challenge_methods_supported": {
                      "const": [
                        "S256"
                      ]
                    },
                    "claims_supported": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "authorization_response_iss_parameter_supported": {
                      "const": true
                    }
                  },
                  "required": [
                    "issuer",
                    "authorization_endpoint",
                    "token_endpoint",
                    "userinfo_endpoint",
                    "jwks_uri",
                    "revocation_endpoint",
                    "introspection_endpoint",
                    "response_types_supported",
                    "response_modes_supported",
                    "grant_types_supported",
                    "subject_types_supported",
                    "id_token_signing_alg_values_supported",
                    "scopes_supported",
                    "token_endpoint_auth_methods_supported",
                    "introspection_endpoint_auth_methods_supported",
                    "revocation_endpoint_auth_methods_supported",
                    "code_challenge_methods_supported",
                    "claims_supported",
                    "authorization_response_iss_parameter_supported"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/oidc/{applicationId}/{environment}/jwks": {
      "get": {
        "tags": [
          "Business OIDC"
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          }
        ],
        "operationId": "getBusinessOidcJwks",
        "security": [],
        "responses": {
          "200": {
            "description": "Public signing keys only. Cache-Control: public, max-age=60.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kty": {
                            "const": "EC"
                          },
                          "crv": {
                            "const": "P-256"
                          },
                          "x": {
                            "type": "string"
                          },
                          "y": {
                            "type": "string"
                          },
                          "kid": {
                            "type": "string"
                          },
                          "alg": {
                            "const": "ES256"
                          },
                          "use": {
                            "const": "sig"
                          }
                        },
                        "required": [
                          "kty",
                          "crv",
                          "x",
                          "y",
                          "kid",
                          "alg",
                          "use"
                        ]
                      }
                    }
                  },
                  "required": [
                    "keys"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/oidc/{applicationId}/{environment}/authorize": {
      "get": {
        "tags": [
          "Business OIDC"
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          },
          {
            "name": "response_type",
            "in": "query",
            "required": true,
            "schema": {
              "const": "code"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Space-delimited registered scopes, including openid."
            }
          },
          {
            "name": "code_challenge",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{43}$"
            }
          },
          {
            "name": "code_challenge_method",
            "in": "query",
            "required": true,
            "schema": {
              "const": "S256"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "nonce",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "resource",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "If present, must exactly equal this issuer + /userinfo. Custom business resources are not supported."
            }
          },
          {
            "name": "response_mode",
            "in": "query",
            "required": false,
            "schema": {
              "const": "query"
            }
          },
          {
            "name": "prompt",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "login",
                "consent",
                "login consent",
                "consent login"
              ],
              "description": "The current host always creates a fresh login transaction and asks for explicit consent; these accepted values skip neither step. none/silent login is unsupported and returns login_required."
            }
          },
          {
            "name": "max_age",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 999999999,
              "description": "Authentication freshness request in seconds. Accepted and validated; current hosted authorization always reauthenticates rather than reusing a cross-transaction sign-in cookie. Does not change or refresh an application session lifetime."
            }
          },
          {
            "name": "login_method",
            "in": "query",
            "required": false,
            "schema": {
              "const": "passkey",
              "description": "Optional hosted-page preference. Opens the passkey sign-in view without changing authentication, current MFA or explicit-consent requirements. Other available methods remain accessible."
            }
          }
        ],
        "operationId": "authorizeBusinessUser",
        "security": [],
        "description": "Open in the system browser. Authenticates an App/environment user using enabled methods and completes the current MFA policy before explicit consent. A previously unlinked social identity may create a new user only with a verified provider email and no local identity, email or deletion-tombstone conflict; existing accounts require explicit linking after recent complete local authentication. Invalid/unregistered callbacks are never followed. Hosted login, provider callbacks and consent form posts are browser implementation details, not APIs for collecting user passwords or provider tokens in clients.",
        "responses": {
          "200": {
            "description": "Hosted App-branded login or consent page. Browser cookies are HttpOnly and transaction-bound.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "302": {
            "description": "Authorized callback with a single-use code (60-second lifetime), state if requested, and iss. Never returns tokens in the URL.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri",
                  "maxLength": 2048
                }
              }
            }
          },
          "303": {
            "description": "Denied/cancelled callback with error=access_denied, state if requested, and iss.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri",
                  "maxLength": 2048
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired authorization request; a local safe HTML error page is returned."
          },
          "429": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/oidc/{applicationId}/{environment}/account-security-request": {
      "post": {
        "tags": [
          "Business OIDC"
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          }
        ],
        "operationId": "createBusinessAccountSecurityRequest",
        "security": [
          {
            "businessOidcAccessToken": []
          }
        ],
        "description": "Create a short-lived, single-use hosted Account security URL from a live opaque OIDC access_token. The source grant, original session, client revision, current assurance, tenant and user must be valid at creation and browser claim. The callback must match a registered redirect of that token's client. Scope is inherited from the grant and cannot be supplied or expanded. Open the returned same-issuer URL in the system browser; it requires fresh authentication of the pinned user before security management. After claim, a separate browser transaction checks the pinned user, client revision and tenant generation; factor changes invalidate old session/grant security versions and require same-user authentication back into the center without reviving the old grant. Explicit revocation of the source connection still terminates unfinished management. Done explicitly issues a new code to the fixed callback using this new state/nonce/PKCE; Cancel returns access_denied with state and iss. Both complete the transaction once. A copied URL alone cannot authenticate or select another user. Never put the access token in a URL or logs. There is no equivalent /v1 session_token browser bridge.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "redirect_uri": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "state": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "nonce": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "code_challenge": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{43}$"
                  },
                  "code_challenge_method": {
                    "const": "S256"
                  }
                },
                "required": [
                  "redirect_uri",
                  "state",
                  "nonce",
                  "code_challenge",
                  "code_challenge_method"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Native OIDC JSON response, without a /v1 data envelope. URL is sensitive, short-lived and single-use. Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048,
                      "description": "Same issuer + /account-security?request=<single-use token>. Open only after checking the configured issuer, path and HTTPS origin."
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Five-minute deadline to claim the URL. A claimed browser center has a separate ten-minute window. Consumers must retain the independent callback state/nonce/verifier long enough for both windows; this timestamp is not the callback deadline."
                    }
                  },
                  "required": [
                    "url",
                    "expires_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/oidc/{applicationId}/{environment}/token": {
      "post": {
        "tags": [
          "Business OIDC"
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          }
        ],
        "operationId": "exchangeBusinessOidcToken",
        "security": [
          {
            "oauthClientBasic": []
          },
          {}
        ],
        "description": "Native: client_id in form, no secret. Web: HTTP Basic client authentication, omit form client_id/client_secret. Both require S256 PKCE for code exchange. Authorization codes and refresh tokens are single-use. Reuse revokes the connection family, including already issued access tokens. Do not automatically replay a refresh after a timeout. No password, implicit or client_credentials grant.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "grant_type": {
                        "const": "authorization_code"
                      },
                      "code": {
                        "type": "string"
                      },
                      "redirect_uri": {
                        "type": "string",
                        "format": "uri",
                        "maxLength": 2048
                      },
                      "code_verifier": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9._~-]{43,128}$"
                      },
                      "client_id": {
                        "type": "string"
                      },
                      "resource": {
                        "type": "string",
                        "format": "uri",
                        "maxLength": 2048
                      }
                    },
                    "required": [
                      "grant_type",
                      "code",
                      "redirect_uri",
                      "code_verifier"
                    ]
                  },
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "grant_type": {
                        "const": "refresh_token"
                      },
                      "refresh_token": {
                        "type": "string"
                      },
                      "client_id": {
                        "type": "string"
                      },
                      "scope": {
                        "type": "string",
                        "description": "If present, must equal the original granted scope string."
                      },
                      "resource": {
                        "type": "string",
                        "format": "uri",
                        "maxLength": 2048
                      }
                    },
                    "required": [
                      "grant_type",
                      "refresh_token"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Token, identity and introspection responses use Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "token_type": {
                      "const": "Bearer"
                    },
                    "expires_in": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 300
                    },
                    "scope": {
                      "type": "string"
                    },
                    "id_token": {
                      "type": "string",
                      "description": "ES256 JWT; audience is client_id. Never use as a business API access token. Offline validation can lag revocation until exp, at most five minutes."
                    },
                    "refresh_token": {
                      "type": "string",
                      "description": "Only when offline_access is granted. Single-use and rotated; persist the new value atomically and serialize refreshes."
                    }
                  },
                  "required": [
                    "access_token",
                    "token_type",
                    "expires_in",
                    "scope",
                    "id_token"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/oidc/{applicationId}/{environment}/userinfo": {
      "get": {
        "tags": [
          "Business OIDC"
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          }
        ],
        "operationId": "getBusinessOidcUserInfo",
        "security": [
          {
            "businessOidcAccessToken": []
          }
        ],
        "description": "Accepts only opaque access tokens for this issuer. Reads live App/environment/client, grant, user security version and originating session. ID Tokens, session_token and MCP tokens are rejected. Fields are limited to granted identity scopes.",
        "responses": {
          "200": {
            "description": "Success. Token, identity and introspection responses use Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "sub": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "picture": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    },
                    "email": {
                      "type": "string",
                      "format": "email"
                    },
                    "email_verified": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "sub"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Business OIDC"
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          }
        ],
        "operationId": "postBusinessOidcUserInfo",
        "security": [
          {
            "businessOidcAccessToken": []
          }
        ],
        "description": "Accepts only opaque access tokens for this issuer. Reads live App/environment/client, grant, user security version and originating session. ID Tokens, session_token and MCP tokens are rejected. Fields are limited to granted identity scopes. POST also uses the Authorization Bearer header; a token in the body is not accepted.",
        "responses": {
          "200": {
            "description": "Success. Token, identity and introspection responses use Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "sub": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "picture": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    },
                    "email": {
                      "type": "string",
                      "format": "email"
                    },
                    "email_verified": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "sub"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/oidc/{applicationId}/{environment}/introspect": {
      "post": {
        "tags": [
          "Business OIDC"
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          }
        ],
        "operationId": "introspectBusinessOidcToken",
        "security": [
          {
            "oauthClientBasic": []
          }
        ],
        "description": "Only confidential Web clients of this App/environment. Online validation of an opaque access token; consumers must also check expected issuer, audience, client_id and scopes. Native public clients use UserInfo. Infrastructure failures remain errors, never active=false.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "token_type_hint": {
                    "const": "access_token"
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Token, identity and introspection responses use Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "active": {
                          "const": false
                        }
                      },
                      "required": [
                        "active"
                      ]
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "active": {
                          "const": true
                        },
                        "sub": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "picture": {
                          "type": "string",
                          "format": "uri",
                          "maxLength": 2048
                        },
                        "email": {
                          "type": "string",
                          "format": "email"
                        },
                        "email_verified": {
                          "type": "boolean"
                        },
                        "client_id": {
                          "type": "string"
                        },
                        "scope": {
                          "type": "string"
                        },
                        "token_type": {
                          "const": "Bearer"
                        },
                        "iss": {
                          "type": "string",
                          "format": "uri",
                          "maxLength": 2048
                        },
                        "aud": {
                          "type": "string",
                          "format": "uri",
                          "maxLength": 2048
                        },
                        "exp": {
                          "type": "integer"
                        },
                        "iat": {
                          "type": "integer"
                        },
                        "application_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "environment": {
                          "enum": [
                            "test",
                            "production"
                          ]
                        }
                      },
                      "required": [
                        "active",
                        "sub",
                        "client_id",
                        "scope",
                        "token_type",
                        "iss",
                        "aud",
                        "exp",
                        "iat",
                        "application_id",
                        "environment"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/oidc/{applicationId}/{environment}/revoke": {
      "post": {
        "tags": [
          "Business OIDC"
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          }
        ],
        "operationId": "revokeBusinessOidcConnection",
        "security": [
          {
            "oauthClientBasic": []
          },
          {}
        ],
        "description": "Accepts a token owned by the authenticated client. Revokes that complete connection and its token family. Unknown or already revoked tokens return success without revealing token existence. Does not revoke unrelated application connections.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "token_type_hint": {
                    "enum": [
                      "access_token",
                      "refresh_token"
                    ]
                  },
                  "client_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Revocation request handled. Empty response body."
          },
          "400": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OAuth protocol error. Credentials are never returned in error messages. Do not log raw callback URLs or request bodies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/management/applications/{applicationId}/environments/{environment}/oidc-clients": {
      "get": {
        "tags": [
          "Studio OIDC client management"
        ],
        "servers": [
          {
            "url": "https://boe-auth.virtneu.com",
            "description": "BOE Studio"
          },
          {
            "url": "https://auth.virtneu.com",
            "description": "Production Studio; deploy and accept separately"
          }
        ],
        "security": [
          {
            "studioSession": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "enum": [
                "active",
                "disabled"
              ]
            }
          }
        ],
        "operationId": "listBusinessOidcClients",
        "responses": {
          "200": {
            "description": "Success. Token, identity and introspection responses use Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "clients": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "client_id": {
                                "type": "string"
                              },
                              "application_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "environment": {
                                "enum": [
                                  "test",
                                  "production"
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "client_type": {
                                "enum": [
                                  "native",
                                  "web"
                                ]
                              },
                              "redirect_uris": {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 20,
                                "uniqueItems": true,
                                "items": {
                                  "type": "string",
                                  "format": "uri",
                                  "maxLength": 2048
                                }
                              },
                              "scopes": {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 4,
                                "uniqueItems": true,
                                "items": {
                                  "enum": [
                                    "openid",
                                    "profile",
                                    "email",
                                    "offline_access"
                                  ]
                                },
                                "description": "Must include openid. Only these identity scopes are supported."
                              },
                              "disabled": {
                                "type": "boolean"
                              },
                              "revision": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "token_endpoint_auth_method": {
                                "enum": [
                                  "none",
                                  "client_secret_basic"
                                ]
                              },
                              "created_at": {
                                "type": "integer"
                              },
                              "updated_at": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "client_id",
                              "application_id",
                              "environment",
                              "name",
                              "client_type",
                              "redirect_uris",
                              "scopes",
                              "disabled",
                              "revision",
                              "token_endpoint_auth_method",
                              "created_at",
                              "updated_at"
                            ]
                          }
                        },
                        "pagination": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "page": {
                              "type": "integer"
                            },
                            "page_size": {
                              "const": 20
                            },
                            "total": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "page",
                            "page_size",
                            "total"
                          ]
                        }
                      },
                      "required": [
                        "clients",
                        "pagination"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Studio OIDC client management"
        ],
        "servers": [
          {
            "url": "https://boe-auth.virtneu.com",
            "description": "BOE Studio"
          },
          {
            "url": "https://auth.virtneu.com",
            "description": "Production Studio; deploy and accept separately"
          }
        ],
        "security": [
          {
            "studioSession": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "createBusinessOidcClient",
        "description": "Requires App configuration write permission. Native clients have no secret; Web secret is returned once. Reusing a creation key returns 409 and never reveals the original secret. No public dynamic registration.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "client_type": {
                    "enum": [
                      "native",
                      "web"
                    ]
                  },
                  "redirect_uris": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 20,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    }
                  },
                  "scopes": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 4,
                    "uniqueItems": true,
                    "items": {
                      "enum": [
                        "openid",
                        "profile",
                        "email",
                        "offline_access"
                      ]
                    },
                    "description": "Must include openid. Only these identity scopes are supported."
                  }
                },
                "required": [
                  "name",
                  "client_type",
                  "redirect_uris",
                  "scopes"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success. Token, identity and introspection responses use Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "client": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "client_id": {
                              "type": "string"
                            },
                            "application_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "environment": {
                              "enum": [
                                "test",
                                "production"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "client_type": {
                              "enum": [
                                "native",
                                "web"
                              ]
                            },
                            "redirect_uris": {
                              "type": "array",
                              "minItems": 1,
                              "maxItems": 20,
                              "uniqueItems": true,
                              "items": {
                                "type": "string",
                                "format": "uri",
                                "maxLength": 2048
                              }
                            },
                            "scopes": {
                              "type": "array",
                              "minItems": 1,
                              "maxItems": 4,
                              "uniqueItems": true,
                              "items": {
                                "enum": [
                                  "openid",
                                  "profile",
                                  "email",
                                  "offline_access"
                                ]
                              },
                              "description": "Must include openid. Only these identity scopes are supported."
                            },
                            "disabled": {
                              "type": "boolean"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "token_endpoint_auth_method": {
                              "enum": [
                                "none",
                                "client_secret_basic"
                              ]
                            },
                            "created_at": {
                              "type": "integer"
                            },
                            "updated_at": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "client_id",
                            "application_id",
                            "environment",
                            "name",
                            "client_type",
                            "redirect_uris",
                            "scopes",
                            "disabled",
                            "revision",
                            "token_endpoint_auth_method",
                            "created_at",
                            "updated_at"
                          ]
                        },
                        "client_secret": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "client"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/management/applications/{applicationId}/environments/{environment}/oidc-clients/{clientId}": {
      "get": {
        "tags": [
          "Studio OIDC client management"
        ],
        "servers": [
          {
            "url": "https://boe-auth.virtneu.com",
            "description": "BOE Studio"
          },
          {
            "url": "https://auth.virtneu.com",
            "description": "Production Studio; deploy and accept separately"
          }
        ],
        "security": [
          {
            "studioSession": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "getBusinessOidcClient",
        "responses": {
          "200": {
            "description": "Success. Token, identity and introspection responses use Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "client_id": {
                          "type": "string"
                        },
                        "application_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "environment": {
                          "enum": [
                            "test",
                            "production"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "client_type": {
                          "enum": [
                            "native",
                            "web"
                          ]
                        },
                        "redirect_uris": {
                          "type": "array",
                          "minItems": 1,
                          "maxItems": 20,
                          "uniqueItems": true,
                          "items": {
                            "type": "string",
                            "format": "uri",
                            "maxLength": 2048
                          }
                        },
                        "scopes": {
                          "type": "array",
                          "minItems": 1,
                          "maxItems": 4,
                          "uniqueItems": true,
                          "items": {
                            "enum": [
                              "openid",
                              "profile",
                              "email",
                              "offline_access"
                            ]
                          },
                          "description": "Must include openid. Only these identity scopes are supported."
                        },
                        "disabled": {
                          "type": "boolean"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "token_endpoint_auth_method": {
                          "enum": [
                            "none",
                            "client_secret_basic"
                          ]
                        },
                        "created_at": {
                          "type": "integer"
                        },
                        "updated_at": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "client_id",
                        "application_id",
                        "environment",
                        "name",
                        "client_type",
                        "redirect_uris",
                        "scopes",
                        "disabled",
                        "revision",
                        "token_endpoint_auth_method",
                        "created_at",
                        "updated_at"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Studio OIDC client management"
        ],
        "servers": [
          {
            "url": "https://boe-auth.virtneu.com",
            "description": "BOE Studio"
          },
          {
            "url": "https://auth.virtneu.com",
            "description": "Production Studio; deploy and accept separately"
          }
        ],
        "security": [
          {
            "studioSession": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048
            },
            "description": "Trusted Studio origin. Current workspace membership, role and MFA policy are checked."
          }
        ],
        "operationId": "updateBusinessOidcClient",
        "description": "Requires the current revision and configuration write permission. Every successful edit increments revision and invalidates existing connections; re-enabling does not revive them. Client type and tenant are immutable.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "redirect_uris": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 20,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    }
                  },
                  "scopes": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 4,
                    "uniqueItems": true,
                    "items": {
                      "enum": [
                        "openid",
                        "profile",
                        "email",
                        "offline_access"
                      ]
                    },
                    "description": "Must include openid. Only these identity scopes are supported."
                  },
                  "disabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Token, identity and introspection responses use Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "client_id": {
                          "type": "string"
                        },
                        "application_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "environment": {
                          "enum": [
                            "test",
                            "production"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "client_type": {
                          "enum": [
                            "native",
                            "web"
                          ]
                        },
                        "redirect_uris": {
                          "type": "array",
                          "minItems": 1,
                          "maxItems": 20,
                          "uniqueItems": true,
                          "items": {
                            "type": "string",
                            "format": "uri",
                            "maxLength": 2048
                          }
                        },
                        "scopes": {
                          "type": "array",
                          "minItems": 1,
                          "maxItems": 4,
                          "uniqueItems": true,
                          "items": {
                            "enum": [
                              "openid",
                              "profile",
                              "email",
                              "offline_access"
                            ]
                          },
                          "description": "Must include openid. Only these identity scopes are supported."
                        },
                        "disabled": {
                          "type": "boolean"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "token_endpoint_auth_method": {
                          "enum": [
                            "none",
                            "client_secret_basic"
                          ]
                        },
                        "created_at": {
                          "type": "integer"
                        },
                        "updated_at": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "client_id",
                        "application_id",
                        "environment",
                        "name",
                        "client_type",
                        "redirect_uris",
                        "scopes",
                        "disabled",
                        "revision",
                        "token_endpoint_auth_method",
                        "created_at",
                        "updated_at"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/management/applications/{applicationId}/environments/{environment}/oidc-clients/{clientId}/rotate-secret": {
      "post": {
        "tags": [
          "Studio OIDC client management"
        ],
        "servers": [
          {
            "url": "https://boe-auth.virtneu.com",
            "description": "BOE Studio"
          },
          {
            "url": "https://auth.virtneu.com",
            "description": "Production Studio; deploy and accept separately"
          }
        ],
        "security": [
          {
            "studioSession": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "test",
                "production"
              ]
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048
            },
            "description": "Trusted Studio origin. Current workspace membership, role and MFA policy are checked."
          }
        ],
        "operationId": "rotateBusinessOidcClientSecret",
        "description": "Web clients only. Requires current revision and write permission. Secret is returned once; old secret and old connection revision are invalidated.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Token, identity and introspection responses use Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "client": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "client_id": {
                              "type": "string"
                            },
                            "application_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "environment": {
                              "enum": [
                                "test",
                                "production"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "client_type": {
                              "enum": [
                                "native",
                                "web"
                              ]
                            },
                            "redirect_uris": {
                              "type": "array",
                              "minItems": 1,
                              "maxItems": 20,
                              "uniqueItems": true,
                              "items": {
                                "type": "string",
                                "format": "uri",
                                "maxLength": 2048
                              }
                            },
                            "scopes": {
                              "type": "array",
                              "minItems": 1,
                              "maxItems": 4,
                              "uniqueItems": true,
                              "items": {
                                "enum": [
                                  "openid",
                                  "profile",
                                  "email",
                                  "offline_access"
                                ]
                              },
                              "description": "Must include openid. Only these identity scopes are supported."
                            },
                            "disabled": {
                              "type": "boolean"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "token_endpoint_auth_method": {
                              "enum": [
                                "none",
                                "client_secret_basic"
                              ]
                            },
                            "created_at": {
                              "type": "integer"
                            },
                            "updated_at": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "client_id",
                            "application_id",
                            "environment",
                            "name",
                            "client_type",
                            "redirect_uris",
                            "scopes",
                            "disabled",
                            "revision",
                            "token_endpoint_auth_method",
                            "created_at",
                            "updated_at"
                          ]
                        },
                        "client_secret": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "client",
                        "client_secret"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Studio structured error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauthClientBasic": {
        "type": "http",
        "scheme": "basic",
        "description": "Confidential client_id/client_secret of this App/environment. Never a service or platform credential."
      },
      "businessOidcAccessToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Opaque access_token from this App/environment issuer; not an ID Token, session_token or MCP token."
      },
      "studioSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Secure-v-auth-studio.session_token",
        "description": "Existing authenticated HTTPS Studio session. Workspace membership, App permission and MFA policy required. Use Studio rather than constructing cookies."
      }
    }
  },
  "externalDocs": {
    "description": "OIDC Core 1.0",
    "url": "https://openid.net/specs/openid-connect-core-1_0.html"
  }
}
