UNPKG

@sphereon/did-auth-siop

Version:

Self Issued OpenID V2 (SIOPv2) and OpenID 4 Verifiable Presentations (OID4VP)

739 lines (737 loc) 1.52 MB
var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // ../../node_modules/.pnpm/tsup@8.5.0_@swc+core@1.14.0_postcss@8.5.6_tsx@4.20.6_typescript@5.8.3_yaml@2.8.1/node_modules/tsup/assets/cjs_shims.js var init_cjs_shims = __esm({ "../../node_modules/.pnpm/tsup@8.5.0_@swc+core@1.14.0_postcss@8.5.6_tsx@4.20.6_typescript@5.8.3_yaml@2.8.1/node_modules/tsup/assets/cjs_shims.js"() { } }); // lib/schemas/validation/schemaValidation.cjs var require_schemaValidation = __commonJS({ "lib/schemas/validation/schemaValidation.cjs"(exports) { "use strict"; init_cjs_shims(); exports.AuthorizationRequestPayloadV1Schema = validate10; var schema14 = { "type": "string", "enum": ["id_token", "vp_token"] }; var schema21 = { "type": "string", "enum": ["fragment", "form_post", "post", "direct_post", "query", "direct_post.jwt", "query.jwt", "fragment.jwt"] }; var schema23 = { "type": "string", "enum": ["get", "post"] }; var schema13 = { "type": "object", "properties": { "client_id": { "type": "string" }, "client_purpose": { "type": "string" }, "id_token_signing_alg_values_supported": { "anyOf": [{ "type": "array", "items": { "type": "string", "enum": ["EdDSA", "RS256", "PS256", "ES256", "ES256K"] } }, { "type": "string", "enum": ["EdDSA", "RS256", "PS256", "ES256", "ES256K"] }] }, "request_object_signing_alg_values_supported": { "anyOf": [{ "type": "array", "items": { "type": "string", "enum": ["EdDSA", "RS256", "PS256", "ES256", "ES256K"] } }, { "type": "string", "enum": ["EdDSA", "RS256", "PS256", "ES256", "ES256K"] }] }, "response_types_supported": { "anyOf": [{ "type": "array", "items": { "$ref": "#/definitions/ResponseType" } }, { "$ref": "#/definitions/ResponseType" }] }, "scopes_supported": { "anyOf": [{ "type": "array", "items": { "$ref": "#/definitions/Scope" } }, { "$ref": "#/definitions/Scope" }] }, "subject_types_supported": { "anyOf": [{ "type": "array", "items": { "$ref": "#/definitions/SubjectType" } }, { "$ref": "#/definitions/SubjectType" }] }, "subject_syntax_types_supported": { "type": "array", "items": { "type": "string" } }, "vp_formats_supported": { "type": "object", "properties": { "jwt": { "type": "object", "properties": { "alg_values": { "type": "array", "items": { "type": "string" } } }, "required": ["alg_values"], "additionalProperties": false }, "jwt_vc": { "type": "object", "properties": { "alg_values": { "type": "array", "items": { "type": "string" } } }, "required": ["alg_values"], "additionalProperties": false }, "jwt_vc_json": { "type": "object", "properties": { "alg_values": { "type": "array", "items": { "type": "string" } } }, "required": ["alg_values"], "additionalProperties": false }, "jwt_vp": { "type": "object", "properties": { "alg_values": { "type": "array", "items": { "type": "string" } } }, "required": ["alg_values"], "additionalProperties": false }, "jwt_vp_json": { "type": "object", "properties": { "alg_values": { "type": "array", "items": { "type": "string" } } }, "required": ["alg_values"], "additionalProperties": false }, "ldp": { "type": "object", "properties": { "proof_type_values": { "type": "array", "items": { "type": "string" } } }, "required": ["proof_type_values"], "additionalProperties": false }, "ldp_vc": { "type": "object", "properties": { "proof_type_values": { "type": "array", "items": { "type": "string" } } }, "required": ["proof_type_values"], "additionalProperties": false }, "ldp_vp": { "type": "object", "properties": { "proof_type_values": { "type": "array", "items": { "type": "string" } } }, "required": ["proof_type_values"], "additionalProperties": false }, "di": { "type": "object", "properties": { "proof_type_values": { "type": "array", "items": { "type": "string" } }, "cryptosuite": { "type": "array", "items": { "type": "string" } } }, "required": ["proof_type_values", "cryptosuite"], "additionalProperties": false }, "di_vc": { "type": "object", "properties": { "proof_type_values": { "type": "array", "items": { "type": "string" } }, "cryptosuite": { "type": "array", "items": { "type": "string" } } }, "required": ["proof_type_values", "cryptosuite"], "additionalProperties": false }, "di_vp": { "type": "object", "properties": { "proof_type_values": { "type": "array", "items": { "type": "string" } }, "cryptosuite": { "type": "array", "items": { "type": "string" } } }, "required": ["proof_type_values", "cryptosuite"], "additionalProperties": false }, "vc+sd-jwt": { "type": "object", "properties": { "sd-jwt_alg_values": { "type": "array", "items": { "type": "string" } }, "kb-jwt_alg_values": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "dc+sd-jwt": { "type": "object", "properties": { "sd-jwt_alg_values": { "type": "array", "items": { "type": "string" } }, "kb-jwt_alg_values": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "mso_mdoc": { "type": "object", "properties": { "issuerauth_alg_values": { "type": "array", "items": { "type": "number" } }, "deviceauth_alg_values": { "type": "array", "items": { "type": "number" } } }, "additionalProperties": false } }, "additionalProperties": false }, "client_name": { "type": "string" }, "logo_uri": { "type": "string" } } }; var schema16 = { "type": "string", "enum": ["openid", "openid did_authn", "profile", "email", "address", "phone"] }; var schema18 = { "type": "string", "enum": ["public", "pairwise"] }; var func2 = Object.prototype.hasOwnProperty; function validate12(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { let vErrors = null; let errors = 0; if (errors === 0) { if (data && typeof data == "object" && !Array.isArray(data)) { if (data.client_id !== void 0) { const _errs1 = errors; if (typeof data.client_id !== "string") { validate12.errors = [{ instancePath: instancePath + "/client_id", schemaPath: "#/properties/client_id/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; return false; } var valid0 = _errs1 === errors; } else { var valid0 = true; } if (valid0) { if (data.client_purpose !== void 0) { const _errs3 = errors; if (typeof data.client_purpose !== "string") { validate12.errors = [{ instancePath: instancePath + "/client_purpose", schemaPath: "#/properties/client_purpose/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; return false; } var valid0 = _errs3 === errors; } else { var valid0 = true; } if (valid0) { if (data.id_token_signing_alg_values_supported !== void 0) { let data2 = data.id_token_signing_alg_values_supported; const _errs5 = errors; const _errs6 = errors; let valid1 = false; const _errs7 = errors; if (errors === _errs7) { if (Array.isArray(data2)) { var valid2 = true; const len0 = data2.length; for (let i0 = 0; i0 < len0; i0++) { let data3 = data2[i0]; const _errs9 = errors; if (typeof data3 !== "string") { const err0 = { instancePath: instancePath + "/id_token_signing_alg_values_supported/" + i0, schemaPath: "#/properties/id_token_signing_alg_values_supported/anyOf/0/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err0]; } else { vErrors.push(err0); } errors++; } if (!(data3 === "EdDSA" || data3 === "RS256" || data3 === "PS256" || data3 === "ES256" || data3 === "ES256K")) { const err1 = { instancePath: instancePath + "/id_token_signing_alg_values_supported/" + i0, schemaPath: "#/properties/id_token_signing_alg_values_supported/anyOf/0/items/enum", keyword: "enum", params: { allowedValues: schema13.properties.id_token_signing_alg_values_supported.anyOf[0].items.enum }, message: "must be equal to one of the allowed values" }; if (vErrors === null) { vErrors = [err1]; } else { vErrors.push(err1); } errors++; } var valid2 = _errs9 === errors; if (!valid2) { break; } } } else { const err2 = { instancePath: instancePath + "/id_token_signing_alg_values_supported", schemaPath: "#/properties/id_token_signing_alg_values_supported/anyOf/0/type", keyword: "type", params: { type: "array" }, message: "must be array" }; if (vErrors === null) { vErrors = [err2]; } else { vErrors.push(err2); } errors++; } } var _valid0 = _errs7 === errors; valid1 = valid1 || _valid0; if (!valid1) { const _errs11 = errors; if (typeof data2 !== "string") { const err3 = { instancePath: instancePath + "/id_token_signing_alg_values_supported", schemaPath: "#/properties/id_token_signing_alg_values_supported/anyOf/1/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err3]; } else { vErrors.push(err3); } errors++; } if (!(data2 === "EdDSA" || data2 === "RS256" || data2 === "PS256" || data2 === "ES256" || data2 === "ES256K")) { const err4 = { instancePath: instancePath + "/id_token_signing_alg_values_supported", schemaPath: "#/properties/id_token_signing_alg_values_supported/anyOf/1/enum", keyword: "enum", params: { allowedValues: schema13.properties.id_token_signing_alg_values_supported.anyOf[1].enum }, message: "must be equal to one of the allowed values" }; if (vErrors === null) { vErrors = [err4]; } else { vErrors.push(err4); } errors++; } var _valid0 = _errs11 === errors; valid1 = valid1 || _valid0; } if (!valid1) { const err5 = { instancePath: instancePath + "/id_token_signing_alg_values_supported", schemaPath: "#/properties/id_token_signing_alg_values_supported/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" }; if (vErrors === null) { vErrors = [err5]; } else { vErrors.push(err5); } errors++; validate12.errors = vErrors; return false; } else { errors = _errs6; if (vErrors !== null) { if (_errs6) { vErrors.length = _errs6; } else { vErrors = null; } } } var valid0 = _errs5 === errors; } else { var valid0 = true; } if (valid0) { if (data.request_object_signing_alg_values_supported !== void 0) { let data4 = data.request_object_signing_alg_values_supported; const _errs13 = errors; const _errs14 = errors; let valid3 = false; const _errs15 = errors; if (errors === _errs15) { if (Array.isArray(data4)) { var valid4 = true; const len1 = data4.length; for (let i1 = 0; i1 < len1; i1++) { let data5 = data4[i1]; const _errs17 = errors; if (typeof data5 !== "string") { const err6 = { instancePath: instancePath + "/request_object_signing_alg_values_supported/" + i1, schemaPath: "#/properties/request_object_signing_alg_values_supported/anyOf/0/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err6]; } else { vErrors.push(err6); } errors++; } if (!(data5 === "EdDSA" || data5 === "RS256" || data5 === "PS256" || data5 === "ES256" || data5 === "ES256K")) { const err7 = { instancePath: instancePath + "/request_object_signing_alg_values_supported/" + i1, schemaPath: "#/properties/request_object_signing_alg_values_supported/anyOf/0/items/enum", keyword: "enum", params: { allowedValues: schema13.properties.request_object_signing_alg_values_supported.anyOf[0].items.enum }, message: "must be equal to one of the allowed values" }; if (vErrors === null) { vErrors = [err7]; } else { vErrors.push(err7); } errors++; } var valid4 = _errs17 === errors; if (!valid4) { break; } } } else { const err8 = { instancePath: instancePath + "/request_object_signing_alg_values_supported", schemaPath: "#/properties/request_object_signing_alg_values_supported/anyOf/0/type", keyword: "type", params: { type: "array" }, message: "must be array" }; if (vErrors === null) { vErrors = [err8]; } else { vErrors.push(err8); } errors++; } } var _valid1 = _errs15 === errors; valid3 = valid3 || _valid1; if (!valid3) { const _errs19 = errors; if (typeof data4 !== "string") { const err9 = { instancePath: instancePath + "/request_object_signing_alg_values_supported", schemaPath: "#/properties/request_object_signing_alg_values_supported/anyOf/1/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err9]; } else { vErrors.push(err9); } errors++; } if (!(data4 === "EdDSA" || data4 === "RS256" || data4 === "PS256" || data4 === "ES256" || data4 === "ES256K")) { const err10 = { instancePath: instancePath + "/request_object_signing_alg_values_supported", schemaPath: "#/properties/request_object_signing_alg_values_supported/anyOf/1/enum", keyword: "enum", params: { allowedValues: schema13.properties.request_object_signing_alg_values_supported.anyOf[1].enum }, message: "must be equal to one of the allowed values" }; if (vErrors === null) { vErrors = [err10]; } else { vErrors.push(err10); } errors++; } var _valid1 = _errs19 === errors; valid3 = valid3 || _valid1; } if (!valid3) { const err11 = { instancePath: instancePath + "/request_object_signing_alg_values_supported", schemaPath: "#/properties/request_object_signing_alg_values_supported/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" }; if (vErrors === null) { vErrors = [err11]; } else { vErrors.push(err11); } errors++; validate12.errors = vErrors; return false; } else { errors = _errs14; if (vErrors !== null) { if (_errs14) { vErrors.length = _errs14; } else { vErrors = null; } } } var valid0 = _errs13 === errors; } else { var valid0 = true; } if (valid0) { if (data.response_types_supported !== void 0) { let data6 = data.response_types_supported; const _errs21 = errors; const _errs22 = errors; let valid5 = false; const _errs23 = errors; if (errors === _errs23) { if (Array.isArray(data6)) { var valid6 = true; const len2 = data6.length; for (let i2 = 0; i2 < len2; i2++) { let data7 = data6[i2]; const _errs25 = errors; if (typeof data7 !== "string") { const err12 = { instancePath: instancePath + "/response_types_supported/" + i2, schemaPath: "#/definitions/ResponseType/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err12]; } else { vErrors.push(err12); } errors++; } if (!(data7 === "id_token" || data7 === "vp_token")) { const err13 = { instancePath: instancePath + "/response_types_supported/" + i2, schemaPath: "#/definitions/ResponseType/enum", keyword: "enum", params: { allowedValues: schema14.enum }, message: "must be equal to one of the allowed values" }; if (vErrors === null) { vErrors = [err13]; } else { vErrors.push(err13); } errors++; } var valid6 = _errs25 === errors; if (!valid6) { break; } } } else { const err14 = { instancePath: instancePath + "/response_types_supported", schemaPath: "#/properties/response_types_supported/anyOf/0/type", keyword: "type", params: { type: "array" }, message: "must be array" }; if (vErrors === null) { vErrors = [err14]; } else { vErrors.push(err14); } errors++; } } var _valid2 = _errs23 === errors; valid5 = valid5 || _valid2; if (!valid5) { const _errs28 = errors; if (typeof data6 !== "string") { const err15 = { instancePath: instancePath + "/response_types_supported", schemaPath: "#/definitions/ResponseType/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err15]; } else { vErrors.push(err15); } errors++; } if (!(data6 === "id_token" || data6 === "vp_token")) { const err16 = { instancePath: instancePath + "/response_types_supported", schemaPath: "#/definitions/ResponseType/enum", keyword: "enum", params: { allowedValues: schema14.enum }, message: "must be equal to one of the allowed values" }; if (vErrors === null) { vErrors = [err16]; } else { vErrors.push(err16); } errors++; } var _valid2 = _errs28 === errors; valid5 = valid5 || _valid2; } if (!valid5) { const err17 = { instancePath: instancePath + "/response_types_supported", schemaPath: "#/properties/response_types_supported/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" }; if (vErrors === null) { vErrors = [err17]; } else { vErrors.push(err17); } errors++; validate12.errors = vErrors; return false; } else { errors = _errs22; if (vErrors !== null) { if (_errs22) { vErrors.length = _errs22; } else { vErrors = null; } } } var valid0 = _errs21 === errors; } else { var valid0 = true; } if (valid0) { if (data.scopes_supported !== void 0) { let data8 = data.scopes_supported; const _errs31 = errors; const _errs32 = errors; let valid9 = false; const _errs33 = errors; if (errors === _errs33) { if (Array.isArray(data8)) { var valid10 = true; const len3 = data8.length; for (let i3 = 0; i3 < len3; i3++) { let data9 = data8[i3]; const _errs35 = errors; if (typeof data9 !== "string") { const err18 = { instancePath: instancePath + "/scopes_supported/" + i3, schemaPath: "#/definitions/Scope/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err18]; } else { vErrors.push(err18); } errors++; } if (!(data9 === "openid" || data9 === "openid did_authn" || data9 === "profile" || data9 === "email" || data9 === "address" || data9 === "phone")) { const err19 = { instancePath: instancePath + "/scopes_supported/" + i3, schemaPath: "#/definitions/Scope/enum", keyword: "enum", params: { allowedValues: schema16.enum }, message: "must be equal to one of the allowed values" }; if (vErrors === null) { vErrors = [err19]; } else { vErrors.push(err19); } errors++; } var valid10 = _errs35 === errors; if (!valid10) { break; } } } else { const err20 = { instancePath: instancePath + "/scopes_supported", schemaPath: "#/properties/scopes_supported/anyOf/0/type", keyword: "type", params: { type: "array" }, message: "must be array" }; if (vErrors === null) { vErrors = [err20]; } else { vErrors.push(err20); } errors++; } } var _valid3 = _errs33 === errors; valid9 = valid9 || _valid3; if (!valid9) { const _errs38 = errors; if (typeof data8 !== "string") { const err21 = { instancePath: instancePath + "/scopes_supported", schemaPath: "#/definitions/Scope/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err21]; } else { vErrors.push(err21); } errors++; } if (!(data8 === "openid" || data8 === "openid did_authn" || data8 === "profile" || data8 === "email" || data8 === "address" || data8 === "phone")) { const err22 = { instancePath: instancePath + "/scopes_supported", schemaPath: "#/definitions/Scope/enum", keyword: "enum", params: { allowedValues: schema16.enum }, message: "must be equal to one of the allowed values" }; if (vErrors === null) { vErrors = [err22]; } else { vErrors.push(err22); } errors++; } var _valid3 = _errs38 === errors; valid9 = valid9 || _valid3; } if (!valid9) { const err23 = { instancePath: instancePath + "/scopes_supported", schemaPath: "#/properties/scopes_supported/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" }; if (vErrors === null) { vErrors = [err23]; } else { vErrors.push(err23); } errors++; validate12.errors = vErrors; return false; } else { errors = _errs32; if (vErrors !== null) { if (_errs32) { vErrors.length = _errs32; } else { vErrors = null; } } } var valid0 = _errs31 === errors; } else { var valid0 = true; } if (valid0) { if (data.subject_types_supported !== void 0) { let data10 = data.subject_types_supported; const _errs41 = errors; const _errs42 = errors; let valid13 = false; const _errs43 = errors; if (errors === _errs43) { if (Array.isArray(data10)) { var valid14 = true; const len4 = data10.length; for (let i4 = 0; i4 < len4; i4++) { let data11 = data10[i4]; const _errs45 = errors; if (typeof data11 !== "string") { const err24 = { instancePath: instancePath + "/subject_types_supported/" + i4, schemaPath: "#/definitions/SubjectType/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err24]; } else { vErrors.push(err24); } errors++; } if (!(data11 === "public" || data11 === "pairwise")) { const err25 = { instancePath: instancePath + "/subject_types_supported/" + i4, schemaPath: "#/definitions/SubjectType/enum", keyword: "enum", params: { allowedValues: schema18.enum }, message: "must be equal to one of the allowed values" }; if (vErrors === null) { vErrors = [err25]; } else { vErrors.push(err25); } errors++; } var valid14 = _errs45 === errors; if (!valid14) { break; } } } else { const err26 = { instancePath: instancePath + "/subject_types_supported", schemaPath: "#/properties/subject_types_supported/anyOf/0/type", keyword: "type", params: { type: "array" }, message: "must be array" }; if (vErrors === null) { vErrors = [err26]; } else { vErrors.push(err26); } errors++; } } var _valid4 = _errs43 === errors; valid13 = valid13 || _valid4; if (!valid13) { const _errs48 = errors; if (typeof data10 !== "string") { const err27 = { instancePath: instancePath + "/subject_types_supported", schemaPath: "#/definitions/SubjectType/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err27]; } else { vErrors.push(err27); } errors++; } if (!(data10 === "public" || data10 === "pairwise")) { const err28 = { instancePath: instancePath + "/subject_types_supported", schemaPath: "#/definitions/SubjectType/enum", keyword: "enum", params: { allowedValues: schema18.enum }, message: "must be equal to one of the allowed values" }; if (vErrors === null) { vErrors = [err28]; } else { vErrors.push(err28); } errors++; } var _valid4 = _errs48 === errors; valid13 = valid13 || _valid4; } if (!valid13) { const err29 = { instancePath: instancePath + "/subject_types_supported", schemaPath: "#/properties/subject_types_supported/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" }; if (vErrors === null) { vErrors = [err29]; } else { vErrors.push(err29); } errors++; validate12.errors = vErrors; return false; } else { errors = _errs42; if (vErrors !== null) { if (_errs42) { vErrors.length = _errs42; } else { vErrors = null; } } } var valid0 = _errs41 === errors; } else { var valid0 = true; } if (valid0) { if (data.subject_syntax_types_supported !== void 0) { let data12 = data.subject_syntax_types_supported; const _errs51 = errors; if (errors === _errs51) { if (Array.isArray(data12)) { var valid17 = true; const len5 = data12.length; for (let i5 = 0; i5 < len5; i5++) { const _errs53 = errors; if (typeof data12[i5] !== "string") { validate12.errors = [{ instancePath: instancePath + "/subject_syntax_types_supported/" + i5, schemaPath: "#/properties/subject_syntax_types_supported/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; return false; } var valid17 = _errs53 === errors; if (!valid17) { break; } } } else { validate12.errors = [{ instancePath: instancePath + "/subject_syntax_types_supported", schemaPath: "#/properties/subject_syntax_types_supported/type", keyword: "type", params: { type: "array" }, message: "must be array" }]; return false; } } var valid0 = _errs51 === errors; } else { var valid0 = true; } if (valid0) { if (data.vp_formats_supported !== void 0) { let data14 = data.vp_formats_supported; const _errs55 = errors; if (errors === _errs55) { if (data14 && typeof data14 == "object" && !Array.isArray(data14)) { const _errs57 = errors; for (const key0 in data14) { if (!func2.call(schema13.properties.vp_formats_supported.properties, key0)) { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported", schemaPath: "#/properties/vp_formats_supported/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }]; return false; break; } } if (_errs57 === errors) { if (data14.jwt !== void 0) { let data15 = data14.jwt; const _errs58 = errors; if (errors === _errs58) { if (data15 && typeof data15 == "object" && !Array.isArray(data15)) { let missing0; if (data15.alg_values === void 0 && (missing0 = "alg_values")) { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt", schemaPath: "#/properties/vp_formats_supported/properties/jwt/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }]; return false; } else { const _errs60 = errors; for (const key1 in data15) { if (!(key1 === "alg_values")) { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt", schemaPath: "#/properties/vp_formats_supported/properties/jwt/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }]; return false; break; } } if (_errs60 === errors) { if (data15.alg_values !== void 0) { let data16 = data15.alg_values; const _errs61 = errors; if (errors === _errs61) { if (Array.isArray(data16)) { var valid20 = true; const len6 = data16.length; for (let i6 = 0; i6 < len6; i6++) { const _errs63 = errors; if (typeof data16[i6] !== "string") { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt/alg_values/" + i6, schemaPath: "#/properties/vp_formats_supported/properties/jwt/properties/alg_values/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; return false; } var valid20 = _errs63 === errors; if (!valid20) { break; } } } else { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt/alg_values", schemaPath: "#/properties/vp_formats_supported/properties/jwt/properties/alg_values/type", keyword: "type", params: { type: "array" }, message: "must be array" }]; return false; } } } } } } else { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt", schemaPath: "#/properties/vp_formats_supported/properties/jwt/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; return false; } } var valid18 = _errs58 === errors; } else { var valid18 = true; } if (valid18) { if (data14.jwt_vc !== void 0) { let data18 = data14.jwt_vc; const _errs65 = errors; if (errors === _errs65) { if (data18 && typeof data18 == "object" && !Array.isArray(data18)) { let missing1; if (data18.alg_values === void 0 && (missing1 = "alg_values")) { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt_vc", schemaPath: "#/properties/vp_formats_supported/properties/jwt_vc/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }]; return false; } else { const _errs67 = errors; for (const key2 in data18) { if (!(key2 === "alg_values")) { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt_vc", schemaPath: "#/properties/vp_formats_supported/properties/jwt_vc/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }]; return false; break; } } if (_errs67 === errors) { if (data18.alg_values !== void 0) { let data19 = data18.alg_values; const _errs68 = errors; if (errors === _errs68) { if (Array.isArray(data19)) { var valid22 = true; const len7 = data19.length; for (let i7 = 0; i7 < len7; i7++) { const _errs70 = errors; if (typeof data19[i7] !== "string") { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt_vc/alg_values/" + i7, schemaPath: "#/properties/vp_formats_supported/properties/jwt_vc/properties/alg_values/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; return false; } var valid22 = _errs70 === errors; if (!valid22) { break; } } } else { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt_vc/alg_values", schemaPath: "#/properties/vp_formats_supported/properties/jwt_vc/properties/alg_values/type", keyword: "type", params: { type: "array" }, message: "must be array" }]; return false; } } } } } } else { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt_vc", schemaPath: "#/properties/vp_formats_supported/properties/jwt_vc/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; return false; } } var valid18 = _errs65 === errors; } else { var valid18 = true; } if (valid18) { if (data14.jwt_vc_json !== void 0) { let data21 = data14.jwt_vc_json; const _errs72 = errors; if (errors === _errs72) { if (data21 && typeof data21 == "object" && !Array.isArray(data21)) { let missing2; if (data21.alg_values === void 0 && (missing2 = "alg_values")) { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt_vc_json", schemaPath: "#/properties/vp_formats_supported/properties/jwt_vc_json/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }]; return false; } else { const _errs74 = errors; for (const key3 in data21) { if (!(key3 === "alg_values")) { validate12.errors = [{ instancePath: instancePath + "/vp_formats_supported/jwt_vc_json", schemaPath: "#/properties/vp_formats_supported/properties/jwt_vc_json/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" }]; return false; break; } } if (_errs74 === errors) { if (data21.alg_values !== void 0) { let data22 = data21.alg_values; const _errs75 = errors; if (errors === _errs75) { if (Array.isArray(data22)) { var valid24 = true; const len8 = data22.lengt