[webauthn] where does return value of PublicKeyCredential.getClientExtensionResults() come from?

equalsJeffH has just created a new issue for https://github.com/w3c/webauthn:

== where does return value of PublicKeyCredential.getClientExtensionResults() come from? ==
[PublicKeyCredential Interface used to look like this](https://www.w3.org/TR/webauthn/#iface-pkcredential):
```
[SecureContext]
interface PublicKeyCredential : Credential {
  [SameObject] readonly attribute ArrayBuffer              rawId;
  [SameObject] readonly attribute AuthenticatorResponse    response;
  [SameObject] readonly attribute AuthenticationExtensions clientExtensionResults;
};
```
..and contained the clientExtensionResults. but we can't do that due to webidl reasons, [so we have changed it to be](https://w3c.github.io/webauthn/#iface-pkcredential) (via PR #633)..
```
[SecureContext, Exposed=Window]
interface PublicKeyCredential : Credential {
    [SameObject] readonly attribute ArrayBuffer              rawId;
    [SameObject] readonly attribute AuthenticatorResponse    response;
    AuthenticationExtensions getClientExtensionResults();
};
```
However, in trying to re-craft the generation of a PublicKeyCredential object in the context of PR #498, we cannot invoke getClientExtensionResults() to get the client extension results because we're building the PublicKeyCredential object and getClientExtensionResults() is part of said object. 

I presume we need to obtain the the [client extension output value](https://w3c.github.io/webauthn/#client-extension-output) and stash it somewhere such that it can be returned to RP script when said RP script invokes getClientExtensionResults() ?

To do that, would we need to define an internal slot in PublicKeyCredential which contains ref to an arraybuffer associated with the |global| which contains the bytes of the result of invoking any requested client extensions, and then invocation of getClientExtensionResults() returns (a reference to?) the arraybuffer?

Please view or discuss this issue at https://github.com/w3c/webauthn/issues/657 using your GitHub account

Received on Wednesday, 18 October 2017 22:20:53 UTC