W3C home > Mailing lists > Public > public-webauthn@w3.org > August 2017

Re: [webauthn] Should the "name" field in PublicKeyCredentialEntity be marked required?

From: Angelo Liao via GitHub <sysbot+gh@w3.org>
Date: Wed, 30 Aug 2017 17:38:10 +0000
To: public-webauthn@w3.org
Message-ID: <issue_comment.created-326064834-1504114681-sysbot+gh@w3.org>
The RP and User dictionary both inherit from the same parent dictionary. Name is a common field that is shared between both dictionaries. But displayName and id are two fields that aren't shared. We decided to remove the required keyword and let JS throw the TypeError so that the inheritance would be clearer. 

 If a developer miss any of the required parameters listed in [#createCredential](https://w3c.github.io/webauthn/#createCredential) step 3, a TypeError would be thrown. TypeError is the same error that will be thrown if there's a required keyword on the IDL. There will be a small difference about the order of when the error is thrown. If the required keyword is on the IDL, the error would likely be thrown first (depending on JS engine design). If the JS is checking whether the parameter is present, the error would likely be thrown after other checks. Either way, there is no difference for web developers. 

-- 
GitHub Notification of comment by AngeloKai
Please view or discuss this issue at https://github.com/w3c/webauthn/issues/538#issuecomment-326064834 using your GitHub account
Received on Wednesday, 30 August 2017 17:38:06 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 07:26:27 UTC