Skip to content

Commit

Permalink
Highlight the examples as JavaScript and remove non-functional .highl…
Browse files Browse the repository at this point in the history
…ight classes. (#339)
  • Loading branch information
jyasskin authored and vijaybh committed Feb 15, 2017
1 parent b61bf0d commit 0d9d89e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ A [RP] simultaneously requests the use of an extension and sets its client argum
{{ScopedCredentialOptions/extensions}} option to the {{makeCredential()}} or {{getAssertion()}} call. The entry key MUST be the
extension identifier, and the value MUST be the <a>client argument</a>.

<pre class="example highlight">
<pre class="example" highlight="js">
var assertionPromise = credentials.getAssertion(..., /* extensions */ {
"webauthnExample_foobar": 42
});
Expand Down Expand Up @@ -2144,7 +2144,7 @@ The extension identifier is chosen as `webauthnExample_geo`. The client argument
extension does not require the <a>[RP]</a> to pass any particular information to the client, other than that it requests the use
of the extension. The [RP] sets this value in its request for an assertion:

<pre class="highlight">
<pre highlight="js">
var assertionPromise =
credentials.getAssertion("SGFuIFNvbG8gc2hvdCBmaXJzdC4",
{}, /* Empty filter */
Expand All @@ -2154,7 +2154,7 @@ of the extension. The [RP] sets this value in its request for an assertion:
The extension defines the additional client data to be the client's location, if known, as a GeoJSON [[GeoJSON]] point. The
client constructs the following client data:

<pre class="highlight">
<pre highlight="js">
{
...,
'extensions': {
Expand All @@ -2173,7 +2173,7 @@ e.g. specifies that the location shall be encoded as a two-element array of floa
authenticator does this by including it in the <a>authenticatorData</a>. As an example, authenticator data may be as follows
(notation taken from [[RFC7049]]):

<pre class="highlight">
<pre>
81 (hex) -- Flags, ED and TUP both set.
20 05 58 1F -- Signature counter
A1 -- CBOR map of one element
Expand Down Expand Up @@ -2301,7 +2301,7 @@ credential. It is intended primarily for [RPS] that wish to tightly control the

An AAGUID is defined as an array containing the globally unique identifier of the authenticator model being sought.

<pre class="idl highlight">
<pre class="idl">
typedef BufferSource AAGUID;
</pre>

Expand Down Expand Up @@ -2374,7 +2374,7 @@ credential. It is intended primarily for [RPS] that wish to tightly control the
Servers supporting UVI extensions MUST support a length of up to 32 bytes for the UVI value.

Example for <a>authenticatorData</a> containing one UVI extension
<pre class="highlight">
<pre>
... -- RP ID hash (32 bytes)
81 -- TUP and ED set
00 00 00 01 -- (initial) signature counter
Expand Down Expand Up @@ -2417,7 +2417,7 @@ credential. It is intended primarily for [RPS] that wish to tightly control the
coordinate representation defined in
[The W3C Geolocation API Specification](https://dev.w3.org/geo/api/spec-source.html#coordinates_interface).

<pre class="highlight">
<pre>
... -- RP ID hash (32 bytes)
81 -- TUP and ED set
00 00 00 01 -- (initial) signature counter
Expand Down Expand Up @@ -2486,7 +2486,7 @@ credential. It is intended primarily for [RPS] that wish to tightly control the
will be most relevant to the Server to include in the UVM.

Example for <a>authenticatorData</a> containing one UVM extension for a multi-factor authentication instance where 2 factors were used:
<pre class="highlight">
<pre>
... -- RP ID hash (32 bytes)
81 -- TUP and ED set
00 00 00 01 -- (initial) signature counter
Expand Down Expand Up @@ -2607,7 +2607,7 @@ This is the first-time flow, in which a new credential is created and registered

The sample code for generating and registering a new key follows:

<pre class="example highlight">
<pre class="example" highlight="js">
var webauthnAPI = navigator.authentication;

if (!webauthnAPI) { /* Platform not capable. Handle error. */ }
Expand Down Expand Up @@ -2689,7 +2689,7 @@ credential.
If the [RP] script does not have any hints available (e.g., from locally stored data) to help it narrow the list of credentials,
then the sample code for performing such an authentication might look like this:

<pre class="example highlight">
<pre class="example" highlight="js">
var webauthnAPI = navigator.authentication;

if (!webauthnAPI) { /* Platform not capable. Handle error. */ }
Expand All @@ -2712,7 +2712,7 @@ On the other hand, if the [RP] script has some hints to help it narrow the list
performing such an authentication might look like the following. Note that this sample also demonstrates how to use the
extension for transaction authorization.

<pre class="example highlight">
<pre class="example" highlight="js">
var webauthnAPI = navigator.authentication;

if (!webauthnAPI) { /* Platform not capable. Handle error. */ }
Expand Down

0 comments on commit 0d9d89e

Please sign in to comment.