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

Ok, so an underlying question here is there an IDL type that can be 
assigned an arbitrary dictionary type?  I.e., we have..
```idl
dictionary ScopedCredentialParameters {              // from webauthn
    required ScopedCredentialType  type;
    required AlgorithmIdentifier   algorithm;
};

typedef (object or DOMString) AlgorithmIdentifier;  // from webcrypto
```
..and we are trying to do this..
```
3. Let `normalizedParameters` be a new list.
4. [...]
- Let `normalizedAlgorithm` be the result of [=normalizing an 
algorithm=] [WebCryptoAPI], [...]
- Append a new object of type `ScopedCredentialParameters` to 
`normalizedParameters`, 
  with `type` set to `current.type` and `algorithm` set to 
`normalizedAlgorithm`.
```
..where `normalizedAlgorithm` is some IDL dictionary.  Is there some 
type we can use for `algorithm` (instead of `AlgorithmIdentifier`) 
such that we can do something like this..
```
3. Let `normalizedParameters` be a new list.
4. [...]
- Let `normalizedAlgorithm` be the result of [=normalizing an 
algorithm=] [WebCryptoAPI], [...]
- Append a new object of type `ScopedCredentialParameters` to 
`normalizedParameters`, 
  with `type` set to `current.type` and `algorithm` set to  the result
 of converting the 
  ECMAScript object represented by `normalizedAlgorithm`, to a WebIDL 
dictionary type, as 
  defined by [WebIDL].
```
..or does `AlgorithmIdentifier` already work because it can be of type
 `object`?  

It seems that the WebCrypto `normalizing an algorithm` algorithm 
performs similar magic and I'm wondering if we can use it as a model?









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

Received on Thursday, 23 February 2017 18:51:09 UTC