@pdtf/schemas 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,637 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://openid.net/schemas/verified_claims-12.json",
4
+ "definitions": {
5
+ "date_type": {
6
+ "type": "string",
7
+ "pattern": "^(?:(?:(?:(?:(?:[1-9]\\d)(?:0[48]|[2468][048]|[13579][26])|(?:(?:[2468][048]|[13579][26])00))(\\/|-|\\.)(?:0?2\\1(?:29)))|(?:(?:[1-9]\\d{3})(\\/|-|\\.)(?:(?:(?:0?[13578]|1[02])\\2(?:31))|(?:(?:0?[13-9]|1[0-2])\\2(?:29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\\2(?:0?[1-9]|1\\d|2[0-8])))))$"
8
+ },
9
+ "time_type": {
10
+ "type": "string",
11
+ "pattern": "^(?:[\\+-]?\\d{4}(?!\\d{2}\\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\\1(?:[12]\\d|0[1-9]|3[01]))?|W(?:[0-4]\\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\\d|[12]\\d{2}|3(?:[0-5]\\d|6[1-6])))(?:[T\\s](?:(?:(?:[01]\\d|2[0-3])(?:(:?)[0-5]\\d)?|24\\:?00)(?:[\\.,]\\d+(?!:))?)?(?:\\2[0-5]\\d(?:[\\.,]\\d+)?)?(?:[zZ]|(?:[\\+-])(?:[01]\\d|2[0-3]):?(?:[0-5]\\d)?)?)?)?$"
12
+ },
13
+ "document_number": {
14
+ "type": "string"
15
+ },
16
+ "document_details": {
17
+ "type": "object",
18
+ "properties": {
19
+ "type": {
20
+ "type": "string"
21
+ },
22
+ "document_number": {
23
+ "$ref": "#/definitions/document_number"
24
+ },
25
+ "number": {
26
+ "$ref": "#/definitions/document_number"
27
+ },
28
+ "personal_number": {
29
+ "type": "string"
30
+ },
31
+ "serial_number": {
32
+ "type": "string"
33
+ },
34
+ "date_of_issuance": {
35
+ "$ref": "#/definitions/date_type"
36
+ },
37
+ "date_of_expiry": {
38
+ "$ref": "#/definitions/date_type"
39
+ },
40
+ "issuer": {
41
+ "type": "object",
42
+ "properties": {
43
+ "name": {
44
+ "type": "string"
45
+ },
46
+ "formatted": {
47
+ "type": "string"
48
+ },
49
+ "street_address": {
50
+ "type": "string"
51
+ },
52
+ "locality": {
53
+ "type": "string"
54
+ },
55
+ "region": {
56
+ "type": "string"
57
+ },
58
+ "postal_code": {
59
+ "type": "string"
60
+ },
61
+ "country": {
62
+ "type": "string"
63
+ },
64
+ "country_code": {
65
+ "type": "string"
66
+ },
67
+ "jurisdiction": {
68
+ "type": "string"
69
+ }
70
+ }
71
+ }
72
+ }
73
+ },
74
+ "validation_method": {
75
+ "type": "object",
76
+ "properties": {
77
+ "type": {
78
+ "type": "string"
79
+ },
80
+ "policy":{
81
+ "type": "string"
82
+ },
83
+ "procedure": {
84
+ "type": "string"
85
+ },
86
+ "status": {
87
+ "type": "string"
88
+ }
89
+ }
90
+ },
91
+ "verification_method": {
92
+ "type": "object",
93
+ "properties": {
94
+ "type": {
95
+ "type": "string"
96
+ },
97
+ "policy":{
98
+ "type": "string"
99
+ },
100
+ "procedure": {
101
+ "type": "string"
102
+ },
103
+ "status": {
104
+ "type": "string"
105
+ }
106
+ }
107
+ },
108
+ "evidence": {
109
+ "type": "object",
110
+ "properties": {
111
+ "type": {
112
+ "type": "string",
113
+ "enum": [
114
+ "electronic_signature",
115
+ "id_document",
116
+ "document",
117
+ "electronic_record",
118
+ "vouch",
119
+ "utility_bill"
120
+ ]
121
+ },
122
+ "attachments": {
123
+ "$ref": "#/definitions/attachments"
124
+ }
125
+ },
126
+ "required": [
127
+ "type"
128
+ ],
129
+ "allOf": [
130
+ {
131
+ "if": {
132
+ "properties": {
133
+ "type": {
134
+ "value": "electronic_signature"
135
+ }
136
+ }
137
+ },
138
+ "then": {
139
+ "properties": {
140
+ "signature_type": {
141
+ "type": "string"
142
+ },
143
+ "issuer": {
144
+ "type": "string"
145
+ },
146
+ "serial_number": {
147
+ "type": "string"
148
+ },
149
+ "created_at": {
150
+ "$ref": "#/definitions/time_type"
151
+ }
152
+ }
153
+ },
154
+ "else": {}
155
+ },
156
+ {
157
+ "if": {
158
+ "properties": {
159
+ "type": {
160
+ "pattern": "^(id_)*document$"
161
+ }
162
+ }
163
+ },
164
+ "then": {
165
+ "properties": {
166
+ "validation_method": {
167
+ "$ref": "#/definitions/validation_method"
168
+ },
169
+ "verification_method": {
170
+ "$ref": "#/definitions/verification_method"
171
+ },
172
+ "method": {
173
+ "type": "string"
174
+ },
175
+ "verifier": {
176
+ "type": "object",
177
+ "properties": {
178
+ "organization": {
179
+ "type": "string"
180
+ },
181
+ "txn": {
182
+ "type": "string"
183
+ }
184
+ }
185
+ },
186
+ "time": {
187
+ "$ref": "#/definitions/time_type"
188
+ },
189
+ "document_details": {
190
+ "$ref": "#/definitions/document_details"
191
+ },
192
+ "document": {
193
+ "$ref": "#/definitions/document_details"
194
+ }
195
+ }
196
+ },
197
+ "else": {}
198
+ },
199
+ {
200
+ "if": {
201
+ "properties": {
202
+ "type": {
203
+ "value": "electronic_record"
204
+ }
205
+ }
206
+ },
207
+ "then": {
208
+ "properties": {
209
+ "validation_method": {
210
+ "$ref": "#/definitions/validation_method"
211
+ },
212
+ "verification_method": {
213
+ "$ref": "#/definitions/verification_method"
214
+ },
215
+ "verifier": {
216
+ "type": "object",
217
+ "properties": {
218
+ "organization": {
219
+ "type": "string"
220
+ },
221
+ "txn": {
222
+ "type": "string"
223
+ }
224
+ }
225
+ },
226
+ "time": {
227
+ "$ref": "#/definitions/time_type"
228
+ },
229
+ "record": {
230
+ "type": "object",
231
+ "properties": {
232
+ "type": {
233
+ "type": "string"
234
+ },
235
+ "personal_number": {
236
+ "type": "string"
237
+ },
238
+ "created_at": {
239
+ "$ref": "#/definitions/date_type"
240
+ },
241
+ "date_of_expiry": {
242
+ "$ref": "#/definitions/date_type"
243
+ },
244
+ "source": {
245
+ "type": "object",
246
+ "properties": {
247
+ "name": {
248
+ "type": "string"
249
+ },
250
+ "formatted": {
251
+ "type": "string"
252
+ },
253
+ "street_address": {
254
+ "type": "string"
255
+ },
256
+ "locality": {
257
+ "type": "string"
258
+ },
259
+ "region": {
260
+ "type": "string"
261
+ },
262
+ "postal_code": {
263
+ "type": "string"
264
+ },
265
+ "country": {
266
+ "type": "string"
267
+ },
268
+ "country_code": {
269
+ "type": "string"
270
+ },
271
+ "jurisdiction": {
272
+ "type": "string"
273
+ }
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
279
+ },
280
+ "else": {}
281
+ },
282
+ {
283
+ "if": {
284
+ "properties": {
285
+ "type": {
286
+ "value": "vouch"
287
+ }
288
+ }
289
+ },
290
+ "then": {
291
+ "properties": {
292
+ "validation_method": {
293
+ "$ref": "#/definitions/validation_method"
294
+ },
295
+ "verification_method": {
296
+ "$ref": "#/definitions/verification_method"
297
+ },
298
+ "verifier": {
299
+ "type": "object",
300
+ "properties": {
301
+ "organization": {
302
+ "type": "string"
303
+ },
304
+ "txn": {
305
+ "type": "string"
306
+ }
307
+ }
308
+ },
309
+ "time": {
310
+ "$ref": "#/definitions/time_type"
311
+ },
312
+ "attestation": {
313
+ "type": "object",
314
+ "properties": {
315
+ "type": {
316
+ "type": "string"
317
+ },
318
+ "reference_number": {
319
+ "type": "string"
320
+ },
321
+ "personal_number": {
322
+ "type": "string"
323
+ },
324
+ "date_of_issuance": {
325
+ "$ref": "#/definitions/date_type"
326
+ },
327
+ "date_of_expiry": {
328
+ "$ref": "#/definitions/date_type"
329
+ },
330
+ "voucher": {
331
+ "type": "object",
332
+ "properties": {
333
+ "name": {
334
+ "type": "string"
335
+ },
336
+ "birthdate": {
337
+ "$ref": "#/definitions/date_type"
338
+ },
339
+ "formatted": {
340
+ "type": "string"
341
+ },
342
+ "street_address": {
343
+ "type": "string"
344
+ },
345
+ "locality": {
346
+ "type": "string"
347
+ },
348
+ "region": {
349
+ "type": "string"
350
+ },
351
+ "postal_code": {
352
+ "type": "string"
353
+ },
354
+ "country": {
355
+ "type": "string"
356
+ },
357
+ "occupation": {
358
+ "type": "string"
359
+ },
360
+ "organization": {
361
+ "type": "string"
362
+ }
363
+ }
364
+ }
365
+ }
366
+ }
367
+ }
368
+ },
369
+ "else": {}
370
+ },
371
+ {
372
+ "if": {
373
+ "properties": {
374
+ "type": {
375
+ "value": "utility_bill"
376
+ }
377
+ }
378
+ },
379
+ "then": {
380
+ "properties": {
381
+ "provider": {
382
+ "type": "object",
383
+ "properties": {
384
+ "name": {
385
+ "type": "string"
386
+ },
387
+ "formatted": {
388
+ "type": "string"
389
+ },
390
+ "street_address": {
391
+ "type": "string"
392
+ },
393
+ "locality": {
394
+ "type": "string"
395
+ },
396
+ "region": {
397
+ "type": "string"
398
+ },
399
+ "postal_code": {
400
+ "type": "string"
401
+ },
402
+ "country": {
403
+ "type": "string"
404
+ }
405
+ }
406
+ },
407
+ "date": {
408
+ "$ref": "#/definitions/date_type"
409
+ }
410
+ }
411
+ },
412
+ "else": {}
413
+ }
414
+ ]
415
+ },
416
+ "digest": {
417
+ "type": "object",
418
+ "properties": {
419
+ "alg": {
420
+ "type": "string"
421
+ },
422
+ "value": {
423
+ "type": "string",
424
+ "contentEncoding": "base64"
425
+ }
426
+ },
427
+ "required": [
428
+ "alg",
429
+ "value"
430
+ ]
431
+ },
432
+ "external_attachment": {
433
+ "type": "object",
434
+ "properties": {
435
+ "desc": {
436
+ "type": "string"
437
+ },
438
+ "digest": {
439
+ "$ref": "#/definitions/digest"
440
+ },
441
+ "url": {
442
+ "type": "string",
443
+ "format": "uri"
444
+ },
445
+ "access_token": {
446
+ "type": ["string", "null"]
447
+ },
448
+ "expires_in": {
449
+ "type": "integer",
450
+ "minimum": 1
451
+ }
452
+ },
453
+ "required": [
454
+ "digest",
455
+ "url"
456
+ ]
457
+ },
458
+ "embedded_attachment": {
459
+ "type": "object",
460
+ "properties": {
461
+ "desc": {
462
+ "type": "string"
463
+ },
464
+ "content_type": {
465
+ "type": "string"
466
+ },
467
+ "content": {
468
+ "type": "string",
469
+ "contentEncoding": "base64"
470
+ }
471
+ },
472
+ "required": [
473
+ "content_type",
474
+ "content"
475
+ ]
476
+ },
477
+ "attachments": {
478
+ "type": "array",
479
+ "minItems": 1,
480
+ "items": {
481
+ "oneOf": [
482
+ {
483
+ "$ref": "#/definitions/external_attachment"
484
+ },
485
+ {
486
+ "$ref": "#/definitions/embedded_attachment"
487
+ }
488
+ ]
489
+ }
490
+ },
491
+ "verified_claims_def": {
492
+ "type": "object",
493
+ "properties": {
494
+ "verification": {
495
+ "type": "object",
496
+ "properties": {
497
+ "trust_framework": {
498
+ "type": "string"
499
+ },
500
+ "assurance_level": {
501
+ "type": "string"
502
+ },
503
+ "assurance_process": {
504
+ "type": "object",
505
+ "properties": {
506
+ "policy":{
507
+ "type": "string"
508
+ },
509
+ "procedure": {
510
+ "type": "string"
511
+ },
512
+ "status": {
513
+ "type": "string"
514
+ }
515
+ }
516
+ },
517
+ "time": {
518
+ "$ref": "#/definitions/time_type"
519
+ },
520
+ "verification_process": {
521
+ "type": "string"
522
+ },
523
+ "evidence": {
524
+ "type": "array",
525
+ "minItems": 1,
526
+ "items": {
527
+ "oneOf": [
528
+ {
529
+ "$ref": "#/definitions/evidence"
530
+ }
531
+ ]
532
+ }
533
+ }
534
+ },
535
+ "required": [
536
+ "trust_framework"
537
+ ],
538
+ "additionalProperties": true
539
+ },
540
+ "claims": {
541
+ "type": "object",
542
+ "minProperties": 1
543
+ }
544
+ },
545
+ "required": [
546
+ "verification",
547
+ "claims"
548
+ ],
549
+ "additionalProperties": false
550
+ },
551
+ "distributed_claims_available_def": {
552
+ "type": "object",
553
+ "properties": {},
554
+ "additionalProperties": {
555
+ "$ref": "verified_claims_request-12.json#definitions/verified_claims_def"
556
+ }
557
+ },
558
+ "aggregated_claims": {
559
+ "properties": {
560
+ "JWT": {
561
+ "type": "string"
562
+ }
563
+ },
564
+ "required": [
565
+ "JWT"
566
+ ]
567
+ },
568
+ "distributed_claims": {
569
+ "properties": {
570
+ "endpoint": {
571
+ "type": "string"
572
+ },
573
+ "access_token": {
574
+ "type": "string"
575
+ }
576
+ },
577
+ "required": [
578
+ "endpoint",
579
+ "access_token"
580
+ ]
581
+ },
582
+ "_claim_sources": {
583
+ "anyOf": [
584
+ {
585
+ "$ref": "#/definitions/aggregated_claims"
586
+ },
587
+ {
588
+ "$ref": "#/definitions/distributed_claims"
589
+ }
590
+ ]
591
+ }
592
+ },
593
+ "properties": {
594
+ "verified_claims": {
595
+ "anyOf": [
596
+ {
597
+ "$ref": "#/definitions/verified_claims_def"
598
+ },
599
+ {
600
+ "type": "array",
601
+ "items": {
602
+ "$ref": "#/definitions/verified_claims_def"
603
+ }
604
+ }
605
+ ]
606
+ },
607
+ "_claim_names": {
608
+ "type": "object",
609
+ "properties": {
610
+ "verified_claims": {
611
+ "anyOf": [
612
+ {
613
+ "type": "string"
614
+ },
615
+ {
616
+ "type": "array",
617
+ "items": {
618
+ "type": "string"
619
+ }
620
+ },
621
+ {
622
+ "$ref": "#/definitions/distributed_claims_available_def"
623
+ }
624
+ ]
625
+ }
626
+ },
627
+ "additionalProperties": false
628
+ },
629
+ "_claim_sources": {
630
+ "type": "object",
631
+ "properties": {},
632
+ "additionalProperties": {
633
+ "$ref": "#/definitions/_claim_sources"
634
+ }
635
+ }
636
+ }
637
+ }