{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/infocert/main/json-schema/infocert-output-credentials-info-schema.json",
  "title": "output-credentials-info",
  "description": "Output parameters for credentials/info method",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/infocert-csc-openapi.json#/components/schemas/output-credentials-info",
  "type": "object",
  "required": [
    "key",
    "cert",
    "authMode",
    "PIN",
    "OTP",
    "multisign",
    "lang"
  ],
  "properties": {
    "description": {
      "$ref": "#/$defs/description"
    },
    "key": {
      "$ref": "#/$defs/key"
    },
    "cert": {
      "$ref": "#/$defs/cert"
    },
    "authMode": {
      "$ref": "#/$defs/authMode"
    },
    "SCAL": {
      "$ref": "#/$defs/SCAL"
    },
    "PIN": {
      "$ref": "#/$defs/PININFO"
    },
    "OTP": {
      "$ref": "#/$defs/OTPINFO"
    },
    "multisign": {
      "$ref": "#/$defs/multisign"
    },
    "lang": {
      "$ref": "#/$defs/lang"
    }
  },
  "$defs": {
    "OTPINFO": {
      "type": "object",
      "description": "Contains information about the credential's OTP",
      "properties": {
        "presence": {
          "type": "string",
          "description": "Specifies if a text-based OTP is required or not, or optional"
        },
        "type": {
          "type": "string",
          "description": "Specifies if a text-based OTP is required or not, or optional"
        },
        "format": {
          "type": "string",
          "description": "Specifies the data format of the OTP"
        },
        "label": {
          "type": "string",
          "description": "Specifies an optional label for the data field used to collect the OTP in the user interface"
        },
        "description": {
          "type": "string",
          "description": "Optionally specifies a free form description of the OTP mechanism in the language specified in the lang parameter"
        },
        "ID": {
          "type": "string",
          "description": "Specifies the identifier of the OTP device or application"
        },
        "provider": {
          "type": "string",
          "description": "Optionally specifies the provider of the OTP device or application."
        }
      }
    },
    "PININFO": {
      "type": "object",
      "description": "Contains information about the credential's PIN",
      "properties": {
        "presence": {
          "type": "string",
          "description": "Specifies if a text-based PIN is required or not, or optional"
        },
        "format": {
          "type": "string",
          "description": "Specifies the format of the PIN",
          "pattern": "^(A|B)$"
        },
        "label": {
          "type": "string",
          "description": "The Label Schema"
        },
        "description": {
          "type": "string",
          "description": "It optionally specifies a free form description of the PIN in the language specified in the lang parameter"
        }
      }
    },
    "SCAL": {
      "type": "string",
      "description": "Specifies the Sole Control Assurance Level required by the credential, as defined in CEN EN 419 241-1",
      "pattern": "^(1|2)$"
    },
    "authMode": {
      "type": "string",
      "description": "Specifies one of the authorization modes",
      "pattern": "^(implicit|explicit|oauth2code|oauth2token)$"
    },
    "cert": {
      "type": "object",
      "description": "Contains information about the signature certificate",
      "properties": {
        "status": {
          "type": "string",
          "description": "The Status Schema",
          "pattern": "^(valid|expired|revoked|suspended)$"
        },
        "certificates": {
          "type": "array",
          "description": "Contains one or more Base64-encoded X.509v3 certificates from the certificate chain",
          "items": {
            "type": "string",
            "description": "A single Base64-encoded X.509v3 certificate"
          }
        },
        "issuerDN": {
          "type": "string",
          "description": "The Issuer Subject Distinguished Name from the X.509v3 end entity certificate in printable string format"
        },
        "serialNumber": {
          "type": "string",
          "description": "The Serial Number from the X.509v3 certificate in hex encoded format"
        },
        "subjectDN": {
          "type": "string",
          "description": "The Distinguished Name from the X.509v3 certificate in printable string format"
        },
        "validFrom": {
          "type": "string",
          "description": "The validity start date from the X.509v3 certificate in printable string format"
        },
        "validTo": {
          "type": "string",
          "description": "The validity end date from the X.509v3 certificate in printable string format"
        }
      }
    },
    "description": {
      "type": "string",
      "description": "Contains a free form description of the authorization transaction in the lang language"
    },
    "key": {
      "type": "object",
      "description": "Information about the key",
      "required": [
        "status",
        "algo",
        "len"
      ],
      "properties": {
        "status": {
          "type": "string",
          "description": "The status of enablement of the signing key of the credential",
          "pattern": "^(enabled|disabled)$"
        },
        "algo": {
          "type": "array",
          "description": "The list of OIDs of the supported key algorithms",
          "items": {
            "type": "string",
            "description": "A single OID"
          }
        },
        "len": {
          "type": "integer",
          "description": "The length of the cryptographic key in bits"
        },
        "curve": {
          "type": "integer",
          "description": "The OID of the ECDSA curve"
        }
      }
    },
    "lang": {
      "type": "string",
      "description": "Request a preferred language according to RFC 3066"
    },
    "multisign": {
      "type": "number",
      "description": "Specifies if the credential supports multiple signatures to be created with a single authorization request"
    }
  }
}