Skip to content

Commit

Permalink
Merge pull request #2168 from w3c/issue-1984-get-return-alg
Browse files Browse the repository at this point in the history
Don't return an algorithm from [[DiscoverFromExternalSource]]
  • Loading branch information
nicksteele authored Oct 9, 2024
2 parents d920442 + bdcb938 commit 9f20a4d
Showing 1 changed file with 27 additions and 30 deletions.
57 changes: 27 additions & 30 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2642,49 +2642,46 @@ When this method is invoked, the user agent MUST execute the following algorithm

1. If |credentialIdFilter| [=list/is empty=] and [=userHandleResult=] is null, [=continue=].

1. Let |constructAssertionAlg| be an algorithm that takes a [=global object=]
|global|, and whose steps are:
1. Let |settings| be the [=current settings object=]. Let |global| be |settings|’ [=global object=].

1. Let |pubKeyCred| be a new {{PublicKeyCredential}} object associated with |global| whose fields are:
1. Let |pubKeyCred| be a new {{PublicKeyCredential}} object associated with |global| whose fields are:

: {{PublicKeyCredential/[[identifier]]}}
:: A new {{ArrayBuffer}}, created using |global|'s [=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=credentialIdResult=]</code>.

: {{PublicKeyCredential/authenticatorAttachment}}
:: The {{AuthenticatorAttachment}} value matching the current [=authenticator attachment modality=] of |authenticator|.
: {{PublicKeyCredential/[[identifier]]}}
:: A new {{ArrayBuffer}}, created using |global|'s [=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=credentialIdResult=]</code>.

: {{PublicKeyCredential/response}}
:: A new {{AuthenticatorAssertionResponse}} object associated with |global| whose fields are:
: {{PublicKeyCredential/authenticatorAttachment}}
:: The {{AuthenticatorAttachment}} value matching the current [=authenticator attachment modality=] of |authenticator|.

: {{AuthenticatorResponse/clientDataJSON}}
:: A new {{ArrayBuffer}}, created using |global|'s [=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=assertionCreationData/clientDataJSONResult=]</code>.

: {{AuthenticatorAssertionResponse/authenticatorData}}
:: A new {{ArrayBuffer}}, created using |global|'s [=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=assertionCreationData/authenticatorDataResult=]</code>.
: {{PublicKeyCredential/response}}
:: A new {{AuthenticatorAssertionResponse}} object associated with |global| whose fields are:

: {{AuthenticatorAssertionResponse/signature}}
:: A new {{ArrayBuffer}}, created using |global|'s [=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=assertionCreationData/signatureResult=]</code>.
: {{AuthenticatorResponse/clientDataJSON}}
:: A new {{ArrayBuffer}}, created using |global|'s [=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=assertionCreationData/clientDataJSONResult=]</code>.

: {{AuthenticatorAssertionResponse/userHandle}}
:: If <code>|assertionCreationData|.[=assertionCreationData/userHandleResult=]</code> is null, set this
field to null. Otherwise, set this field to a new {{ArrayBuffer}}, created using |global|'s
[=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=assertionCreationData/userHandleResult=]</code>.
: {{AuthenticatorAssertionResponse/authenticatorData}}
:: A new {{ArrayBuffer}}, created using |global|'s [=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=assertionCreationData/authenticatorDataResult=]</code>.

: {{PublicKeyCredential/[[clientExtensionsResults]]}}
: {{AuthenticatorAssertionResponse/signature}}
:: A new {{ArrayBuffer}}, created using |global|'s [=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=assertionCreationData/clientExtensionResults=]</code>.
<code>|assertionCreationData|.[=assertionCreationData/signatureResult=]</code>.

: {{AuthenticatorAssertionResponse/userHandle}}
:: If <code>|assertionCreationData|.[=assertionCreationData/userHandleResult=]</code> is null, set this
field to null. Otherwise, set this field to a new {{ArrayBuffer}}, created using |global|'s
[=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=assertionCreationData/userHandleResult=]</code>.

1. Return |pubKeyCred|.
: {{PublicKeyCredential/[[clientExtensionsResults]]}}
:: A new {{ArrayBuffer}}, created using |global|'s [=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=assertionCreationData/clientExtensionResults=]</code>.

1. [=set/For each=] remaining |authenticator| in |issuedRequests| invoke the [=authenticatorCancel=] operation
on |authenticator| and [=set/remove=] it from |issuedRequests|.

1. Return |constructAssertionAlg| and terminate this algorithm.
1. Return |pubKeyCred| and terminate this algorithm.
</dl>

1. Throw a "{{NotAllowedError}}" {{DOMException}}.
Expand Down

0 comments on commit 9f20a4d

Please sign in to comment.