Skip to content

Commit

Permalink
Add note about extensions not using ext ID as entry key
Browse files Browse the repository at this point in the history
  • Loading branch information
emlun committed Jun 10, 2020
1 parent 2824aa4 commit 76c93dd
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5235,13 +5235,21 @@ A [=[RP]=] simultaneously requests the use of an extension and sets its [=client
{{PublicKeyCredentialCreationOptions/extensions}} option to the {{CredentialsContainer/create()}} or {{CredentialsContainer/get()}} call.
The entry key is the [=extension identifier=] and the value is the [=client extension input=].

Note: Other documents have specified extensions where the extension input does not always use the [=extension identifier=]
as the entry key.
New extensions SHOULD follow the above convention.

<pre class="example" highlight="js">
var assertionPromise = navigator.credentials.get({
publicKey: {
// The challenge is produced by the server; see the Security Considerations
challenge: new Uint8Array([4,99,22 /* 29 more random bytes generated by the server */]),
// Other members omitted for brevity
extensions: {
"webauthnExample_foobar": 42
// An extension with identifier "webauthnExample_foobar"
// and 2 input parameters
"webauthnExample_foobar": {
foo: 42,
bar: "barfoo"
}
}
}
});
Expand Down

0 comments on commit 76c93dd

Please sign in to comment.