{
  "openapi": "3.1.0",
  "info": {
    "title": "Signing Server CSC API",
    "version": "1.0.0",
    "description": "Signing Server 1.0.0 CSC API 2.2.0.0 integration. Registered-client OAuth authorization code with authenticated PAR and S256 PKCE, configured SAML identification, separate exact-batch consent, durable one-use authority and static PKCS12/PKCS11 credential mapping. Configuration selector: csc-v1. The paths and schemas define the supported operations."
  },
  "servers": [
    {
      "url": "https://signing.example.invalid"
    }
  ],
  "paths": {
    "/csc/v2/info": {
      "post": {
        "summary": "Discover the configured CSC subset",
        "description": "",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InfoRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful bounded operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Info"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request or rejected exact authority; token redemption uses invalid_grant and unsupported grants use unsupported_grant_type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid registered client proof or missing/invalid/expired resource token. Invalid Bearer responses include WWW-Authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable, overloaded or unknown completion; never assume safe private retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/csc/v2/credentials/list": {
      "post": {
        "summary": "Discover only the verified signer’s configured credentials",
        "description": "Requires service scope. Optional userID must equal the grant’s opaque signer reference. onlyValid filters disabled/expired entries; discovery never grants signing consent.",
        "security": [
          {
            "CscBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful bounded operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request or rejected exact authority; token redemption uses invalid_grant and unsupported grants use unsupported_grant_type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid registered client proof or missing/invalid/expired resource token. Invalid Bearer responses include WWW-Authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable, overloaded or unknown completion; never assume safe private retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/csc/v2/credentials/info": {
      "post": {
        "summary": "Read an accessible credential’s public metadata",
        "description": "Service token or credential token for exactly its own credential. authInfo=true returns auth.mode=oauth2code.",
        "security": [
          {
            "CscBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InfoCredentialRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful bounded operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credential"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request or rejected exact authority; token redemption uses invalid_grant and unsupported grants use unsupported_grant_type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid registered client proof or missing/invalid/expired resource token. Invalid Bearer responses include WWW-Authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable, overloaded or unknown completion; never assume safe private retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/csc/v2/signatures/signHash": {
      "post": {
        "summary": "Consume exact one-batch signing authority",
        "description": "Credential Bearer without SAD, identical credential Bearer+SAD, or service Bearer+credential SAD for same client/person. Require exact digest multiset and count including duplicates. Public signatures follow request order. Only SHA256/RSA PKCS1 v1.5; no originals uploaded. Asynchronous-only validity_period/response_uri are ignored and never fetched.",
        "security": [
          {
            "CscBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignHashRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful bounded operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignHashResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request or rejected exact authority; token redemption uses invalid_grant and unsupported grants use unsupported_grant_type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid registered client proof or missing/invalid/expired resource token. Invalid Bearer responses include WWW-Authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable, overloaded or unknown completion; never assume safe private retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/csc/v2/oauth2/pushed_authorize": {
      "post": {
        "summary": "Authenticate and push immutable authorization request",
        "description": "private_key_jwt audience is this exact endpoint. All common fields required. Credential scope additionally requires credentialID/numSignatures/hashes/hashAlgorithmOID; service scope forbids them. Optional Authorization Bearer service grant becomes a bound parent. No caller URL is retrieved.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ParRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful bounded operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request or rejected exact authority; token redemption uses invalid_grant and unsupported grants use unsupported_grant_type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid registered client proof or missing/invalid/expired resource token. Invalid Bearer responses include WWW-Authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable, overloaded or unknown completion; never assume safe private retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/csc/v2/oauth2/token": {
      "post": {
        "summary": "Exchange one consent-bound code with S256 PKCE",
        "description": "Fresh endpoint-bound private_key_jwt. Code consumption and new token hash creation commit atomically; no refresh token or reissue on response loss.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful bounded operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request or rejected exact authority; token redemption uses invalid_grant and unsupported grants use unsupported_grant_type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid registered client proof or missing/invalid/expired resource token. Invalid Bearer responses include WWW-Authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable, overloaded or unknown completion; never assume safe private retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/csc/v2/oauth2/revoke": {
      "post": {
        "summary": "Revoke this registered client’s own token",
        "description": "Fresh endpoint-bound private_key_jwt. Unknown or another client’s token returns the same empty success. Parent revocation blocks subsequent child consumption.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RevokeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful bounded operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Empty"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request or rejected exact authority; token redemption uses invalid_grant and unsupported grants use unsupported_grant_type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid registered client proof or missing/invalid/expired resource token. Invalid Bearer responses include WWW-Authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable, overloaded or unknown completion; never assume safe private retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/csc/v2/oauth2/authorize": {
      "get": {
        "summary": "Begin an owned PAR-bound private SAML browser flow",
        "description": "Only client_id and request_uri query fields. Exact registered redirect is taken from authenticated PAR, never from this GET. Creates a Secure/HttpOnly/SameSite=None __Host-csc_{flow} cookie and signed SAML POST form. All browser/PAR state is process-bound and discarded on restart.",
        "security": [],
        "parameters": [
          {
            "name": "client_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "request_uri",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 77
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Private HTML form for configured SAML IdP"
          },
          "400": {
            "description": "Unknown/replayed/expired PAR or invalid query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/csc/saml/acs/{connection}": {
      "post": {
        "summary": "Validate fresh signed/encrypted SAML in the private browser",
        "description": "Requires the exact private __Host-csc_{flow} cookie, no duplicate Cookie headers/names. Identity is accepted only from the configured signed/encrypted SAML proof; the caller cannot submit a neutral identity object.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SamlCallback"
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Malformed request or rejected exact authority; token redemption uses invalid_grant and unsupported grants use unsupported_grant_type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid registered client proof or missing/invalid/expired resource token. Invalid Bearer responses include WWW-Authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable, overloaded or unknown completion; never assume safe private retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "Escaped private HTML with exact approval and CSRF"
          }
        },
        "parameters": [
          {
            "name": "connection",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ]
      }
    },
    "/csc/consent/{flow}": {
      "post": {
        "summary": "Approve or cancel explicit immutable service/signing consent",
        "description": "Requires the exact private __Host-csc_{flow} cookie, no duplicate Cookie headers/names. Identity is accepted only from the configured signed/encrypted SAML proof; the caller cannot submit a neutral identity object.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ConsentRequest"
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Malformed request or rejected exact authority; token redemption uses invalid_grant and unsupported grants use unsupported_grant_type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid registered client proof or missing/invalid/expired resource token. Invalid Bearer responses include WWW-Authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable, overloaded or unknown completion; never assume safe private retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "303": {
            "description": "Registered redirect with state, code or access_denied, and iss equal to configured Signing Server origin; never SAML IdP issuer"
          }
        },
        "parameters": [
          {
            "name": "flow",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 43
            }
          }
        ]
      }
    },
    "/health/live": {
      "get": {
        "summary": "Content-free live probe",
        "security": [],
        "responses": {
          "200": {
            "description": "UP",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "const": "UP\n"
                }
              }
            }
          },
          "503": {
            "description": "DOWN",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "const": "DOWN\n"
                }
              }
            }
          }
        }
      }
    },
    "/health/ready": {
      "get": {
        "summary": "Content-free ready probe",
        "security": [],
        "responses": {
          "200": {
            "description": "UP",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "const": "UP\n"
                }
              }
            }
          },
          "503": {
            "description": "DOWN",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "const": "DOWN\n"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "CscBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Opaque 256-bit service or credential capability; no JWT access-token format."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "enum": [
              "invalid_request",
              "invalid_client",
              "invalid_token",
              "invalid_grant",
              "unsupported_grant_type",
              "temporarily_unavailable"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "InfoRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "lang": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": []
      },
      "Info": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "specs": {
            "const": "2.2.0.0"
          },
          "name": {
            "const": "IDOmbud Signing Server"
          },
          "logo": {
            "type": "string",
            "format": "uri",
            "description": "Operator-configured HTTPS URI of a published JPEG/PNG, at most 256x256 pixels; server never fetches it."
          },
          "region": {
            "const": "SE"
          },
          "lang": {
            "const": "en-US"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "oauth2": {
            "type": "string",
            "format": "uri",
            "description": "Configured service origin + /csc/v2. Append oauth2/{method} once."
          },
          "authType": {
            "const": [
              "oauth2code"
            ]
          },
          "supportedHashTypes": {
            "const": [
              "dtbsr"
            ]
          },
          "methods": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "minItems": 1,
            "maxItems": 8
          },
          "asynchronousOperationMode": {
            "const": false
          },
          "signAlgorithms": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "algos": {
                "const": [
                  "1.2.840.113549.1.1.1"
                ]
              }
            },
            "required": [
              "algos"
            ]
          },
          "signature_formats": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "formats": {
                "const": []
              }
            },
            "required": [
              "formats"
            ]
          },
          "conformance_levels": {
            "const": []
          }
        },
        "required": [
          "specs",
          "name",
          "logo",
          "region",
          "lang",
          "description",
          "oauth2",
          "authType",
          "supportedHashTypes",
          "methods",
          "asynchronousOperationMode",
          "signAlgorithms",
          "signature_formats",
          "conformance_levels"
        ]
      },
      "Credential": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "credentialID": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "key": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "status": {
                "enum": [
                  "enabled",
                  "disabled"
                ]
              },
              "algo": {
                "const": [
                  "1.2.840.113549.1.1.1"
                ]
              },
              "len": {
                "type": "integer",
                "minimum": 2048,
                "maximum": 4096
              }
            },
            "required": [
              "status",
              "algo",
              "len"
            ]
          },
          "cert": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "certificates": {
                "type": "array",
                "items": {
                  "type": "string",
                  "contentEncoding": "base64"
                },
                "minItems": 1,
                "maxItems": 8
              },
              "issuerDN": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "subjectDN": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "serialNumber": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "validFrom": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "validTo": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              }
            },
            "required": []
          },
          "auth": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "mode": {
                "const": "oauth2code"
              }
            },
            "required": [
              "mode"
            ]
          },
          "multisign": {
            "const": 64
          },
          "lang": {
            "const": "en-US"
          }
        },
        "required": [
          "key",
          "multisign",
          "lang"
        ]
      },
      "ListRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "userID": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "credentialInfo": {
            "type": "boolean",
            "default": false
          },
          "onlyValid": {
            "type": "boolean",
            "default": false
          },
          "certificates": {
            "enum": [
              "none",
              "single",
              "chain"
            ],
            "default": "single"
          },
          "certInfo": {
            "type": "boolean",
            "default": false
          },
          "authInfo": {
            "type": "boolean",
            "default": false
          },
          "lang": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "clientData": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          }
        },
        "required": []
      },
      "ListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "credentialIDs": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "minItems": 0,
            "maxItems": 256
          },
          "credentialInfos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Credential"
            },
            "minItems": 0,
            "maxItems": 256
          },
          "onlyValid": {
            "type": "boolean"
          }
        },
        "required": [
          "credentialIDs"
        ]
      },
      "InfoCredentialRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "credentialID": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "certificates": {
            "enum": [
              "none",
              "single",
              "chain"
            ],
            "default": "single"
          },
          "certInfo": {
            "type": "boolean",
            "default": false
          },
          "authInfo": {
            "type": "boolean",
            "default": false
          },
          "lang": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "clientData": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          }
        },
        "required": [
          "credentialID"
        ]
      },
      "SignHashRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "credentialID": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "SAD": {
            "type": "string",
            "minLength": 1,
            "maxLength": 43,
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "hashes": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 44,
              "pattern": "^[A-Za-z0-9+/]{43}=$"
            },
            "minItems": 1,
            "maxItems": 64
          },
          "hashAlgorithmOID": {
            "const": "2.16.840.1.101.3.4.2.1"
          },
          "signAlgo": {
            "const": "1.2.840.113549.1.1.1"
          },
          "operationMode": {
            "const": "S"
          },
          "clientData": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          },
          "validity_period": {},
          "response_uri": {}
        },
        "required": [
          "credentialID",
          "hashes",
          "hashAlgorithmOID",
          "signAlgo"
        ]
      },
      "SignHashResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "signatures": {
            "type": "array",
            "items": {
              "type": "string",
              "contentEncoding": "base64"
            },
            "minItems": 1,
            "maxItems": 64
          }
        },
        "required": [
          "signatures"
        ]
      },
      "ParRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "client_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "client_assertion_type": {
            "const": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
          },
          "client_assertion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192
          },
          "response_type": {
            "const": "code"
          },
          "redirect_uri": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "format": "uri"
          },
          "scope": {
            "enum": [
              "service",
              "credential"
            ]
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[!-~]+$"
          },
          "code_challenge": {
            "type": "string",
            "minLength": 1,
            "maxLength": 43,
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "code_challenge_method": {
            "const": "S256"
          },
          "connection": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "credentialID": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "numSignatures": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2,
            "pattern": "^(?:[1-9]|[1-5][0-9]|6[0-4])$"
          },
          "hashes": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2879,
            "description": "CSV of 1..64 canonical 32-byte base64url digests, each optionally followed by one =; duplicate occurrences retained."
          },
          "hashAlgorithmOID": {
            "const": "2.16.840.1.101.3.4.2.1"
          },
          "description": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "client_id",
          "client_assertion_type",
          "client_assertion",
          "response_type",
          "redirect_uri",
          "scope",
          "state",
          "code_challenge",
          "code_challenge_method",
          "connection"
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "scope": {
                  "const": "credential"
                }
              }
            },
            "then": {
              "required": [
                "credentialID",
                "numSignatures",
                "hashes",
                "hashAlgorithmOID"
              ]
            },
            "else": {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "credentialID"
                    ]
                  },
                  {
                    "required": [
                      "numSignatures"
                    ]
                  },
                  {
                    "required": [
                      "hashes"
                    ]
                  },
                  {
                    "required": [
                      "hashAlgorithmOID"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "ParResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "request_uri": {
            "type": "string",
            "minLength": 1,
            "maxLength": 77,
            "pattern": "^urn:ietf:params:oauth:request_uri:[A-Za-z0-9_-]{43}$"
          },
          "expires_in": {
            "type": "integer",
            "minimum": 1,
            "maximum": 120
          }
        },
        "required": [
          "request_uri",
          "expires_in"
        ]
      },
      "TokenRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "client_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "client_assertion_type": {
            "const": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
          },
          "client_assertion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192
          },
          "grant_type": {
            "const": "authorization_code"
          },
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 43,
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "redirect_uri": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "format": "uri"
          },
          "code_verifier": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9._~-]{43,128}$"
          }
        },
        "required": [
          "client_id",
          "client_assertion_type",
          "client_assertion",
          "grant_type",
          "code",
          "redirect_uri",
          "code_verifier"
        ]
      },
      "TokenResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "access_token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 43,
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "token_type": {
            "const": "Bearer"
          },
          "expires_in": {
            "type": "integer",
            "minimum": 1,
            "maximum": 300
          },
          "scope": {
            "enum": [
              "service",
              "credential"
            ]
          }
        },
        "required": [
          "access_token",
          "token_type",
          "expires_in",
          "scope"
        ]
      },
      "RevokeRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "client_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "client_assertion_type": {
            "const": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
          },
          "client_assertion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192
          },
          "token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "token_type_hint": {
            "const": "access_token"
          }
        },
        "required": [
          "client_id",
          "client_assertion_type",
          "client_assertion",
          "token"
        ]
      },
      "Empty": {
        "type": "object",
        "additionalProperties": false,
        "properties": {},
        "required": []
      },
      "ConsentRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "csrf": {
            "type": "string",
            "minLength": 1,
            "maxLength": 43,
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "decision": {
            "enum": [
              "approve",
              "cancel"
            ]
          }
        },
        "required": [
          "csrf",
          "decision"
        ]
      },
      "SamlCallback": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "RelayState": {
            "type": "string",
            "minLength": 1,
            "maxLength": 43,
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "SAMLResponse": {
            "type": "string",
            "minLength": 1,
            "maxLength": 349528,
            "contentEncoding": "base64"
          }
        },
        "required": [
          "RelayState",
          "SAMLResponse"
        ]
      }
    }
  },
  "x-local-bounds": {
    "json_and_oauth_form_bytes": 16384,
    "authorize_query_characters": 4096,
    "saml_form_bytes": 524288,
    "saml_decoded_bytes": 262144,
    "form_fields": 24,
    "concurrent_work": 16,
    "pending_flows": 64,
    "pending_per_client": 8,
    "par_seconds": 120,
    "private_ceremony_seconds": 180,
    "code_seconds": 30,
    "service_token_seconds": 300,
    "credential_token_seconds": 30
  },
  "x-event-log-configuration": {
    "schema": "event-log.configuration.schema.json",
    "contract": "event-log.contract.json",
    "default": "disabled",
    "scope": "Trusted optional local CEF configuration; no caller controls fields/sink"
  }
}
