Skip to content

Commit

Permalink
fixup publickey -> public-key|publicKey per jyasskin-the-enforcer ;-)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffH authored and JeffH committed May 1, 2017
1 parent fb2b593 commit 866e882
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ that are returned to the caller when a new credential is created, or a new asser

: <dfn>\[[type]]</dfn>
:: The {{PublicKeyCredential}} [=interface object=]'s {{Credential/[[type]]}} [=internal slot=]'s value is the string
"`publickey`".
"`public-key`".

Note: This is reflected via the {{Credential/type}} attribute getter inherited from {{Credential}}.

Expand Down Expand Up @@ -1161,7 +1161,7 @@ following Web IDL.

<pre class="idl">
enum PublicKeyCredentialType {
"publickey"
"public-key"
};
</pre>

Expand All @@ -1170,7 +1170,7 @@ following Web IDL.
more credential types are defined. The values of this enumeration are used for versioning the Authentication Assertion and
attestation structures according to the type of the authenticator.

Currently one credential type is defined, namely "<dfn>publickey</dfn>".
Currently one credential type is defined, namely "<dfn>public-key</dfn>".
</div>


Expand Down Expand Up @@ -2466,7 +2466,7 @@ The entry key is the [=extension identifier=] and the value is the [=client exte

<pre class="example" highlight="js">
var assertionPromise = navigator.credentials.get({
publickey: {
publicKey: {
challenge: "...",
extensions: {
"webauthnExample_foobar": 42
Expand Down Expand Up @@ -2532,7 +2532,7 @@ the use of the extension. The [RP] sets this value in its request for an asserti
<pre highlight="js">
var assertionPromise =
navigator.credentials.get({
publickey: {
publicKey: {
challenge: "SGFuIFNvbG8gc2hvdCBmaXJzdC4",
allowList: [], /* Empty filter */
extensions: { 'webauthnExample_geo': true }
Expand Down Expand Up @@ -3066,7 +3066,7 @@ The sample code for generating and registering a new key follows:
<pre class="example" highlight="js">
if (!PublicKeyCredential) { /* Platform not capable. Handle error. */ }

var publickey = {
var publicKey = {
challenge: Uint8Array.from(window.atob("PGifxAoBwCkWkm4b1CiIl5otCphiIh6MijdjbWFjomA="), c=>c.charCodeAt(0)),

// Relying Party:
Expand All @@ -3086,11 +3086,11 @@ The sample code for generating and registering a new key follows:
// prefers an ES256 credential.
parameters: [
{
type: "publickey",
type: "public-key",
algorithm: "ES256",
},
{
type: "publickey",
type: "public-key",
algorithm: "RS256",
},
],
Expand All @@ -3102,7 +3102,7 @@ The sample code for generating and registering a new key follows:
};

// Note: The following call will cause the authenticator to display UI.
navigator.credentials.create({ publickey })
navigator.credentials.create({ publicKey })
.then(function (newCredentialInfo) {
// Send new credential info to server for verification and registration.
}).catch(function (err) {
Expand Down Expand Up @@ -3157,10 +3157,10 @@ then the sample code for performing such an authentication might look like this:
var options = {
challenge: new TextEncoder().encode("climb a mountain"),
timeout: 60000, // 1 minute
allowList: [{ type: "publickey" }]
allowList: [{ type: "public-key" }]
};

navigator.credentials.get({ "publickey": options })
navigator.credentials.get({ "publicKey": options })
.then(function (assertion) {
// Send assertion to server for verification
}).catch(function (err) {
Expand All @@ -3177,11 +3177,11 @@ extension for transaction authorization.

var encoder = new TextEncoder();
var acceptableCredential1 = {
type: "publickey",
type: "public-key",
id: encoder.encode("!!!!!!!hi there!!!!!!!\n")
};
var acceptableCredential2 = {
type: "publickey",
type: "public-key",
id: encoder.encode("roses are red, violets are blue\n")
};

Expand All @@ -3193,7 +3193,7 @@ extension for transaction authorization.
"Wave your hands in the air like you just don't care" };
};

navigator.credentials.get({ "publickey": options })
navigator.credentials.get({ "publicKey": options })
.then(function (assertion) {
// Send assertion to server for verification
}).catch(function (err) {
Expand Down

0 comments on commit 866e882

Please sign in to comment.