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

@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