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

Re: [webauthn] What does normalizedParameters actually contain in makeCredential?

From: =JeffH via GitHub <sysbot+gh@w3.org>
Date: Thu, 23 Feb 2017 01:12:53 +0000
To: public-webauthn@w3.org
Message-ID: <issue_comment.created-281858444-1487812372-sysbot+gh@w3.org>
@bzbarsky wrote:
>  Is the intention that normalizedParameters be a list of (type, 
algorithm) pairs where the algorithm is an IDL dictionary?

in looking at this I'm concluding that the answer to the above is 
"yeah, sorta that", however, the type-impedance-mismatch you note..
> But "normalizedAlgorithm" is an IDL dictionary, while the algorithm 
member of a ScopedCredentialParameters dictionary is a (DOMString or 
object).
```idl
dictionary ScopedCredentialParameters {         // from webauthn
    required ScopedCredentialType  type;
    required AlgorithmIdentifier   algorithm;
};

typedef (object or DOMString) AlgorithmIdentifier;  // from webcrypto
```
..means that we need to do some more explcit magic in order to assign 
`normalizedAlgorithm` to `ScopedCredentialParameters.algorithm`, yes?
  

Might that magic be something like using the 
https://heycam.github.io/webidl/#dictionary-to-es conversion and 
saying something like..

>Add a new object of type `ScopedCredentialParameters` to 
`normalizedParameters`, with `type` set to `current.type` and 
`algorithm` set to the result of feeding `normalizedAlgorithm` to 
[dictionary-to-es](https://heycam.github.io/webidl/#dictionary-to-es).

..?











-- 
GitHub Notification of comment by equalsJeffH
Please view or discuss this issue at 
https://github.com/w3c/webauthn/issues/265#issuecomment-281858444 
using your GitHub account
Received on Thursday, 23 February 2017 01:13:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:58:33 UTC