Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change from getClientExtensionResults function to clientExtensionResults attribute #810

Merged
merged 4 commits into from
Feb 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ that are returned to the caller when a new credential is created, or a new asser
interface PublicKeyCredential : Credential {
[SameObject] readonly attribute ArrayBuffer rawId;
[SameObject] readonly attribute AuthenticatorResponse response;
AuthenticationExtensionsClientOutputs getClientExtensionResults();
[SameObject] readonly attribute AuthenticationExtensionsClientOutputs clientExtensionResults;
};
</xmp>
<dl dfn-type="attribute" dfn-for="PublicKeyCredential">
Expand All @@ -639,10 +639,11 @@ that are returned to the caller when a new credential is created, or a new asser
the {{PublicKeyCredential}} was created in response to {{CredentialsContainer/get()}}, and this attribute's value
will be an {{AuthenticatorAssertionResponse}}.

: {{PublicKeyCredential/getClientExtensionResults()}}
:: This operation returns the value of {{PublicKeyCredential/[[clientExtensionsResults]]}}, which is a [=map=] containing
[=extension identifier=] → [=client extension output=] entries produced by the extension's
[=client extension processing=].
: <dfn>clientExtensionResults</dfn>
:: This attribute contains a [=map=] of [=extension identifier=] → [=client extension output=] entries, produced by the
[=client extension processing=] of [=client extensions=] requested by the [=[RP]=] upon invocation of either
{{CredentialsContainer/create()|navigator.credentials.create()}} or
{{CredentialsContainer/get()|navigator.credentials.get()}}.

: <dfn>\[[type]]</dfn>
:: The {{PublicKeyCredential}} [=interface object=]'s {{Credential/[[type]]}} [=internal slot=]'s value is the string
Expand All @@ -663,11 +664,6 @@ that are returned to the caller when a new credential is created, or a new asser
the format or length of this identifier, except that it MUST be sufficient for the platform to uniquely select a key.
For example, an authenticator without on-board storage may create identifiers containing a [=credential private key=]
wrapped with a symmetric key that is burned into the authenticator.

: <dfn>\[[clientExtensionsResults]]</dfn>
:: This [=internal slot=] contains the results of processing client extensions requested by the [=[RP]=] upon the
[=[RP]=]'s invocation of either {{CredentialsContainer/create()|navigator.credentials.create()}} or
{{CredentialsContainer/get()|navigator.credentials.get()}}.
</dl>

{{PublicKeyCredential}}'s [=interface object=] inherits {{Credential}}'s implementation of
Expand Down Expand Up @@ -1003,9 +999,8 @@ When this method is invoked, the user agent MUST execute the following algorithm
: {{AuthenticatorAttestationResponse/attestationObject}}
:: |attestationObject|

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

1. Return |pubKeyCred|.

Expand Down Expand Up @@ -1352,9 +1347,8 @@ When this method is invoked, the user agent MUST execute the following algorithm
[=%ArrayBuffer%=], containing the bytes of
<code>|assertionCreationData|.[=assertionCreationData/userHandleResult=]</code>.

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

1. Return |pubKeyCred|.

Expand Down Expand Up @@ -3688,7 +3682,7 @@ Supported [=client extensions=] are recorded as a dictionary in the [=client dat
{{CollectedClientData/clientExtensions}}. For each such extension, the client adds an entry to this dictionary with the
[=extension identifier=] as the key, and the extension's [=client extension input=] as the value.

Likewise, the [=client extension outputs=] are represented as a dictionary in the result of {{PublicKeyCredential/getClientExtensionResults()}}
Likewise, the [=client extension outputs=] are represented as a dictionary in the {{PublicKeyCredential/clientExtensionResults}} value,
with [=extension identifiers=] as keys, and the <dfn>client extension output</dfn> value of each extension as the value.
Like the [=client extension input=], the [=client extension output=] is a value that can be encoded in JSON.

Expand Down