Skip to content

Commit

Permalink
Reference the Encoding spec's UTF-8 Encode definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jcjones committed Dec 20, 2016
1 parent f702fba commit df3b309
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ spec: HTML51; urlPrefix: http://www.w3.org/TR/html51/; for: web
urlPrefix: webappapis.html;
text: current settings object; for:web; url:current-settings-object
text: Navigator; for: interface; url:the-navigator-object

<!-- spec: Encoding; urlPrefix: https://encoding.spec.whatwg.org/ -->
spec: Encoding; urlPrefix: https://encoding.spec.whatwg.org/; for: encoding
type: dfn
text: UTF-8 Encoded; url: utf-8-encode
</pre>


Expand Down Expand Up @@ -400,7 +405,7 @@ When this method is invoked, the user agent MUST execute the following algorithm
- If {{ScopedCredentialOptions/rpId}} is specified, then invoke the procedure used for <a>relaxing the same-origin
restriction</a> by setting the `document.domain` attribute, using {{ScopedCredentialOptions/rpId}} as the given value
but without changing the current document's `domain`. If no errors are thrown, set |rpId| to the value of `host` as
computed by this procedure, and |rpIdHash| to the SHA-256 hash of the UTF-8 encoding of |rpId|. Otherwise, reject |promise| with a
computed by this procedure, and |rpIdHash| to the SHA-256 hash of the <a>UTF-8 encoding</a> of |rpId|. Otherwise, reject |promise| with a
<a>DOMException</a> whose name is "SecurityError", and terminate this algorithm.

4. Process each element of {{cryptoParameters}} using the following steps, to produce a new sequence |normalizedParameters|.
Expand Down Expand Up @@ -496,7 +501,7 @@ When this method is invoked, the user agent MUST execute the following algorithm
- If {{AssertionOptions/rpId}} is specified, then invoke the procedure used for <a>relaxing the same-origin restriction</a>
by setting the `document.domain` attribute, using {{AssertionOptions/rpId}} as the given value but without changing the
current document's `domain`. If no errors are thrown, set |rpId| to the value of `host` as computed by this procedure,
and |rpIdHash| to the SHA-256 hash of the UTF-8 encoding of |rpId|. Otherwise, reject |promise| with a <a>DOMException</a> whose name is
and |rpIdHash| to the SHA-256 hash of the <a>UTF-8 encoding</a> of |rpId|. Otherwise, reject |promise| with a <a>DOMException</a> whose name is
"SecurityError", and terminate this algorithm.

4. If {{AssertionOptions/extensions}} was specified, process any extensions supported by this client platform, to produce the
Expand Down Expand Up @@ -852,7 +857,7 @@ string-valued keys. Values may be any type that has a valid encoding in JSON. It
This structure is used by the client to compute the following quantities:

: <dfn>clientDataJSON</dfn>
:: This is the UTF-8 encoded JSON serialization [[RFC7159]] of a {{ClientData}} dictionary.
:: This is the <a>UTF-8 encoded</a> JSON serialization [[RFC7159]] of a {{ClientData}} dictionary.

: <dfn>clientDataHash</dfn>
:: This is the hash (computed using <a>hashAlg</a>) of <a>clientDataJSON</a>.
Expand Down Expand Up @@ -2004,7 +2009,7 @@ authenticator does this by including it in the <a>authenticatorData</a>. As an e
A1 -- CBOR map of one element
73 -- Key 1: CBOR text string of 19 bytes
77 65 62 61 75 74 68 6E 45 78 61
6D 70 6C 65 5F 67 65 6F -- "webauthnExample_geo" UTF-8 encoded string
6D 70 6C 65 5F 67 65 6F -- "webauthnExample_geo" <a>UTF-8 encoded</a> string
82 -- Value 1: CBOR array of two elements
FA 42 82 1E B3 -- Element 1: Latitude as CBOR encoded float
FA C1 5F E3 7F -- Element 2: Longitude as CBOR encoded float
Expand All @@ -2030,7 +2035,7 @@ error.
:: `fido_appid`

: Client argument
:: A single UTF-8 encoded string specifying a FIDO |appId|.
:: A single <a>UTF-8 encoded</a> string specifying a FIDO |appId|.

: Client processing
:: If {{AssertionOptions/rpId}} is present, reject promise with a DOMException
Expand Down Expand Up @@ -2060,7 +2065,7 @@ intended for display on a trusted device on the authenticator.
:: `webauthn_txAuthSimple`

: Client argument
:: A single UTF-8 encoded string prompt.
:: A single <a>UTF-8 encoded</a> string prompt.

: Client processing
:: None, except default forwarding of client argument to authenticator argument.
Expand All @@ -2073,7 +2078,7 @@ intended for display on a trusted device on the authenticator.
authenticator may insert line breaks if needed.

: Authenticator data
:: A single UTF-8 encoded string, representing the prompt as displayed (including any eventual line breaks).
:: A single <a>UTF-8 encoded</a> string, representing the prompt as displayed (including any eventual line breaks).

The generic version of this extension allows images to be used as prompts as well. This allows authenticators without a font
rendering engine to be used and also supports a richer visual appearance.
Expand All @@ -2083,7 +2088,7 @@ rendering engine to be used and also supports a richer visual appearance.

: Client argument
:: A CBOR map with one pair of data items (CBOR tagged as 0xa1). The pair of data items consists of
1. one UTF-8 encoded string <dfn>contentType</dfn>, containing the MIME-Type of the content, e.g. "image/png"
1. one <a>UTF-8 encoded</a> string <dfn>contentType</dfn>, containing the MIME-Type of the content, e.g. "image/png"
2. and the <dfn>content</dfn> itself, encoded as CBOR byte array.

: Client processing
Expand Down Expand Up @@ -2158,7 +2163,7 @@ credential. It is intended primarily for [RPS] that wish to tightly control the
defined below. This extension can be added to attestation statements.

: Authenticator data
:: The SupportedExtensions extension is a list (CBOR array) of extension identifiers (UTF-8 encoded strings).
:: The SupportedExtensions extension is a list (CBOR array) of extension identifiers (<a>UTF-8 encoded</a> strings).


## User Verification Index (UVI) Extension ## {#uvi-extension}
Expand Down Expand Up @@ -2202,7 +2207,7 @@ credential. It is intended primarily for [RPS] that wish to tightly control the
... -- all public key alg etc.
A1 -- extension: CBOR map of one element
6C -- Key 1: CBOR text string of 11 bytes
77 65 62 61 75 74 68 6E 5F 75 76 69 -- "webauthn_uvi" UTF-8 encoded string
77 65 62 61 75 74 68 6E 5F 75 76 69 -- "webauthn_uvi" <a>UTF-8 encoded</a> string
58 20 -- Value 1: CBOR byte string with 0x20 bytes
00 43 B8 E3 BE 27 95 8C -- the UVI value itself
28 D5 74 BF 46 8A 85 CF
Expand Down Expand Up @@ -2245,16 +2250,16 @@ credential. It is intended primarily for [RPS] that wish to tightly control the
... -- all public key alg etc.
A1 -- extension: CBOR map of one element
6C -- Value 1: CBOR text string of 11 bytes
77 65 62 61 75 74 68 6E 5F 6C 6F 63 -- "webauthn_loc" UTF-8 encoded string
77 65 62 61 75 74 68 6E 5F 6C 6F 63 -- "webauthn_loc" <a>UTF-8 encoded</a> string
86 -- Value 2: array of 6 elements
68 -- Element 1: CBOR text string of 8 bytes
6C 61 74 69 74 75 64 65 -- “latitude” UTF-8 encoded string
6C 61 74 69 74 75 64 65 -- “latitude” <a>UTF-8 encoded</a> string
FB ... -- Element 2: Latitude as CBOR encoded double-precision float
69 -- Element 3: CBOR text string of 9 bytes
6C 6F 6E 67 69 74 75 64 65 -- “longitude” UTF-8 encoded string
6C 6F 6E 67 69 74 75 64 65 -- “longitude” <a>UTF-8 encoded</a> string
FB ... -- Element 4: Longitude as CBOR encoded double-precision float
68 -- Element 5: CBOR text string of 8 bytes
61 6C 74 69 74 75 64 65 -- “altitude” UTF-8 encoded string
61 6C 74 69 74 75 64 65 -- “altitude” <a>UTF-8 encoded</a> string
FB ... -- Element 6: Altitude as CBOR encoded double-precision float
</pre>

Expand Down Expand Up @@ -2310,7 +2315,7 @@ credential. It is intended primarily for [RPS] that wish to tightly control the
... -- all public key alg etc.
A1 -- extension: CBOR map of one element
6C -- Key 1: CBOR text string of 12 bytes
77 65 62 61 75 74 68 6E 2E 75 76 6d -- "webauthn_uvm" UTF-8 encoded string
77 65 62 61 75 74 68 6E 2E 75 76 6d -- "webauthn_uvm" <a>UTF-8 encoded</a> string
82 -- Value 1: CBOR array of length 2 indicating two factor usage
83 -- Item 1: CBOR array of length 3
02 -- Subitem 1: CBOR integer for User Verification Method Fingerprint
Expand Down

0 comments on commit df3b309

Please sign in to comment.