Skip to content

Commit af363f4

Browse files
committed
Add provider validation
1 parent 866310c commit af363f4

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

index.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,42 @@ <h3>
567567
</li>
568568
<li>If |requests| is empty, [=exception/throw=] a {{TypeError}}.
569569
</li>
570+
<li>If |providers| [=list/is empty=], [=exception/throw=] a
571+
{{TypeError}}.
572+
</li>
573+
<li>Let |range| be [=list/get the indices|the indices=] of |providers|.
574+
</li>
575+
<li>[=Set/For each=] |n| of the |range|:
576+
<ol>
577+
<li>Let |provider| be the [=list/item=] at |providers|'s |n| index.
578+
</li>
579+
<li>If |provider|'s {{DigitalCredentialGetRequest/protocol}} is not
580+
allowed by the user agent, [=exception/throw=] a
581+
{{NotSupportedError}} {{DOMException}}.
582+
</li>
583+
<li>If the [=digital credential/exchange protocol=] defines an IDL
584+
[=dictionary=] for [=converted to an idl value|conversion=]:
585+
<ol>
586+
<li>Let |request| be |provider|'s
587+
{{DigitalCredentialGetRequest/data}} [=converted to an idl
588+
value|converted=] to a |dictionary|. [=exception/throw|Rethrow=]
589+
any exceptions.
590+
</li>
591+
</ol>
592+
</li>
593+
<li>Otherwise, let |request| be |provider|'s
594+
{{DigitalCredentialGetRequest/data}}.
595+
</li>
596+
<li>Validate |request| against any validation rules set forth in the
597+
corresponding [=digital credentials registry/specification=]. If any
598+
of |request|'s members are invalid, [=exception/throw=] a
599+
{{TypeError}}.
600+
</li>
601+
<li>Set [=list/item=] at |providers|'s |n| index's
602+
{{DigitalCredentialGetRequest/data}} to |request|.
603+
</li>
604+
</ol>
605+
</li>
570606
<li>
571607
<aside class="issue">
572608
Details of how to actually get the [=digital credential=] are

0 commit comments

Comments
 (0)