Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

challenge in ClientData should be ArrayBuffer or BufferSource ? #117

Closed
equalsJeffH opened this issue Jun 2, 2016 · 1 comment
Closed

Comments

@equalsJeffH
Copy link
Contributor

https://w3c.github.io/webauthn/#sec-client-data

    required DOMString           challenge;    <<==  should be ArrayBuffer or BufferSource ?
    [...]
};

I think ArrayBuffer is more appropriate in ClientData than BufferSource, but I'm not sure, and I'm not sure it actually matters since ClientData is used internal-to-the-authnr in order to marshal info before hashing it.

@equalsJeffH equalsJeffH added this to the CR milestone Jun 2, 2016
@vijaybh
Copy link
Contributor

vijaybh commented Jun 3, 2016

No, this is left as DOMString on purpose.

ClientData is, as you note, an internal structure that needs to be serialized and hashed. So we need to define what that serialization looks like. We have two choices:

  1. Define these types as DOMString, and say they will be produced by encoding the appropriate quantity as base64.
  2. Define these types as ArrayBuffer, in which case they will be serialized in the array literal notation, i.e. something like "{ challenge: [31, 41, 59, 26, 53, 58, 97, 93, 238, ...], ... }"

The first seems more readable and is more compact, so I went with that when fixing #61.

@vijaybh vijaybh closed this as completed Jun 3, 2016
vijaybh pushed a commit that referenced this issue Sep 1, 2016
* move IDL frags to applicable sections. fixes #112 and #117.

* link to IDL index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants