Re: [webauthn] `CredentialRequestOptions` make otherwise valid values invalid in an undesirable way

@bzbarsky replied:
>> Gecko implements this proposed resolution to heycam/webidl#76:
> 
> Gecko doesn't implement the elidable stuff yet.

Hm, I was interpreting your https://github.com/w3c/webauthn/issues/750#issuecomment-358422136 in combination with https://github.com/heycam/webidl/issues/76#issue-118108356 and @jcjones's comment on the webauthn call, to mean that Gecko does implement the "elidable stuff".

You implied gecko implements "a resolution" and are now indicating that the aforementioned resolution is different than the "elidable stuff" ?

>> and note in spec prose that if one does not pass all of them in
>> with values when calling navigator.credentials.{create(),get()},
>> that the latter calls will not succeed
> 
> Right, this is option 1.

ok.

> ... the prose in
> https://heycam.github.io/webidl/#required-dictionary-member
> explicitly says:
> 
> A required dictionary member must not have a default value.

doh.

> you could do non-required members with default values.  That would be option 2.

ah!  so we can do this:
```
dictionary PublicKeyCredentialCreationOptions {
    PublicKeyCredentialRpEntity         rp  = {};
    PublicKeyCredentialUserEntity       user = {}; 
    BufferSource                        challenge = null;
    [...]
};

dictionary PublicKeyCredentialEntity {
    DOMString     name  =  "";
    USVString     icon;
};

dictionary PublicKeyCredentialUserEntity : PublicKeyCredentialEntity {
    BufferSource   id = null;
    DOMString      displayName = "";
};
```
..?   (I simply removed all the `required` keywords).


> Option 3 is to argue that https://github.com/heycam/webidl/issues/76
> should be wontfixed and that dictionary members of dictionaries
> should not be treated the same way as dictionaries as arguments.
> Basically comes down to what a dictionary "is", conceptually...

yes, this seems to be an interesting question to discuss over there.  @emlun followed up his above comment here with https://github.com/heycam/webidl/issues/76#issuecomment-401766639


-- 
GitHub Notification of comment by equalsJeffH
Please view or discuss this issue at https://github.com/w3c/webauthn/issues/750#issuecomment-401912677 using your GitHub account

Received on Monday, 2 July 2018 19:43:56 UTC