{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daon/json-schema/daon-start-passcode-registration-response-schema.json",
  "title": "StartPasscodeRegistrationResponse",
  "description": "The response from the create passcode registration API",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daon-user-passcode-management-api-openapi.yml#/components/schemas/StartPasscodeRegistrationResponse",
  "type": "object",
  "properties": {
    "passcodeRequirements": {
      "$ref": "#/$defs/PasscodeRequirements"
    },
    "algorithmInfo": {
      "$ref": "#/$defs/PasscodeAlgorithmInfo"
    },
    "sessionId": {
      "type": "string",
      "description": "The session ID which must be supplied to the server when completing client-validated passcode registration."
    }
  },
  "$defs": {
    "PasscodeAlgorithmInfo": {
      "type": "object",
      "description": "Passcode algorithm information for client-validated passcode registration.",
      "properties": {
        "type": {
          "type": "string",
          "description": "Identifies the passcode algorithm.",
          "enum": [
            "SRP"
          ]
        },
        "parameters": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          },
          "description": "The algorithm parameters required by the client."
        }
      }
    },
    "PasscodeRegex": {
      "type": "object",
      "description": "A regular expression matched against a passcode.",
      "properties": {
        "pattern": {
          "type": "string",
          "description": "The regex pattern."
        },
        "error": {
          "type": "string",
          "description": "An error which will be displayed if the regex check fails."
        }
      },
      "required": [
        "error",
        "pattern"
      ]
    },
    "PasscodeRequirements": {
      "type": "object",
      "description": "Passcode requirements for client-validated passcode registration.",
      "properties": {
        "minimumLength": {
          "type": "integer",
          "format": "int32",
          "description": "An optional passcode minimum length."
        },
        "maximumLength": {
          "type": "integer",
          "format": "int32",
          "description": "An optional passcode maximum length."
        },
        "digitCount": {
          "type": "integer",
          "format": "int32",
          "description": "Optional minimum number of digits within the passcode."
        },
        "symbolCount": {
          "type": "integer",
          "format": "int32",
          "description": "Optional minimum number of symbols within the passcode."
        },
        "lowerCaseCount": {
          "type": "integer",
          "format": "int32",
          "description": "Optional minimum number of lower case characters within the passcode."
        },
        "upperCaseCount": {
          "type": "integer",
          "format": "int32",
          "description": "Optional minimum number of upper case characters within the passcode."
        },
        "characterVariety": {
          "type": "integer",
          "format": "int32",
          "description": "Optional minimum number of different classes of character that the passcode must contain, where the classes are symbols, digits, upper case and lower case."
        },
        "passcodeHistory": {
          "type": "integer",
          "format": "int32",
          "description": "Optional passcode history. A submitted passcode is checked against a configurable number of previously submitted passcodes to see if it matches."
        },
        "requiredRegExes": {
          "type": "array",
          "description": "Optional list of required regular expressions, all of which must be matched for the passcode to be accepted as valid.",
          "items": {
            "$ref": "#/$defs/PasscodeRegex"
          }
        },
        "allowedRegExes": {
          "type": "array",
          "description": "Optional list of allowed regular expressions, at least one of which must be matched for the passcode to be accepted as valid.",
          "items": {
            "$ref": "#/$defs/PasscodeRegex"
          }
        },
        "disallowedRegExes": {
          "type": "array",
          "description": "Optional list of disallowed regular expressions, none of which must be matched for the passcode to be accepted as valid.",
          "items": {
            "$ref": "#/$defs/PasscodeRegex"
          }
        }
      }
    }
  }
}