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
Make AuthenticatorAttestationResponseJSON.clientDataJSON a DOMString or USVString #2060
Comments
Yes, the intention was to use consistent encoding of |
Fair enough. |
Adding to what @MasterKale said - critically, the encoding of |
|
JSON-compatible serialization must be used for clientDataJSON. This makes the
ArrayBuffer
aUSVString
for platforms whose native string encoding is UTF-8. For such platforms, it would be easier and faster to just send the data as is; and for non-UTF-8 platforms, encoding theArrayBuffer
such that it is aUSVString
/DOMString
is better than having to encode it as aBase64URLString
which itself is a subset ofDOMString
anyway. Is the reasonAuthenticatorAttestationResponseJSON.clientDataJSON
defined that way for consistency alone? Specifically that allArrayBuffer
s are converted to that?On the server side, the data needs to be decoded twice: first to transform the
Base64URLString
into UTF-8 data and second to transform the UTF-8 data into a JSON map; however if the data were simply aUSVString
/DOMString
, the server would only need to decode the data once as a JSON map.The text was updated successfully, but these errors were encountered: