Skip to content

Commit 4cc965c

Browse files
committed
Add request validation
1 parent 4624c60 commit 4cc965c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,30 @@ <h3>
696696
|request| to a JSON string. [=exception/throw|Re-throw=] any
697697
[=exception=].
698698
</li>
699+
<li>If |requests|'s {{DigitalCredentialGetRequest/protocol}} is not
700+
allowed by the user agent, [=exception/throw=] a
701+
{{NotSupportedError}} {{DOMException}}.
702+
</li>
703+
<li>If the [=digital credential/exchange protocol=] defines an IDL
704+
[=dictionary=] for [=converted to an idl value|conversion=]:
705+
<ol>
706+
<li>Let |request| be |requests|'s
707+
{{DigitalCredentialGetRequest/data}} [=converted to an idl
708+
value|converted=] to a |dictionary|. [=exception/throw|Rethrow=]
709+
any exceptions.
710+
</li>
711+
</ol>
712+
</li>
713+
<li>Otherwise, let |request| be |requests|'s
714+
{{DigitalCredentialGetRequest/data}}.
715+
</li>
716+
<li>Validate |request| against any validation rules set forth in the
717+
corresponding [=registry/link|Specification=]. If any of |request|'s
718+
members are invalid, [=exception/throw=] a {{TypeError}}.
719+
</li>
720+
<li>Set [=list/item=] at |providers|'s |n| index's
721+
{{DigitalCredentialGetRequest/data}} to |request|
722+
</li>
699723
</ol>
700724
</li>
701725
<li>

0 commit comments

Comments
 (0)