Skip to content

Commit

Permalink
Review update: Use CamelCase for extension identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
jcjones committed Jul 12, 2016
1 parent 0478d22 commit 9de3a98
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions index.bs
Expand Up @@ -1427,14 +1427,12 @@ authenticator. Since all extensions are optional, this will not cause a function
## Extension identifiers ## {#extension-id}

Extensions are identified by a string, chosen by the extension author. Extension identifiers should aim to be globally unique,
e.g., by using reverse domain-name of the defining entity such as `com.example.webauthn.myextension`.

Note: Use of dot-separated notation here does not imply an object hierarchy.
e.g., by including the defining entity such as `myCompanyExtension`.

Extensions that may exist in multiple versions should take care to include a version in their identifier. In effect, different
versions are thus treated as different extensions, e.g., `mycompany-myextension_v01`
versions are thus treated as different extensions, e.g., `myCompanyExtension01`

Extensions defined in this specification use a fixed prefix of `webauthn.` for the extension identifiers. This prefix should not
Extensions defined in this specification use a fixed prefix of `webauthn` for the extension identifiers. This prefix should not
be used for extensions not defined by the W3C.


Expand Down Expand Up @@ -1463,7 +1461,7 @@ A [RP] simultaneously requests the use of an extension and sets its client argum

<pre class="example highlight">
var assertionPromise = credentials.getAssertion(..., /* extensions */ {
"webauthn-example.foobar": 42
"webauthnExampleFoobar": 42
});
</pre>

Expand Down Expand Up @@ -1513,15 +1511,15 @@ authenticator data value of each extension as the value.
To illustrate the requirements above, consider a hypothetical extension "Geo". This extension, if supported, lets both clients
and authenticators embed their geolocation in assertions.

The extension identifier is chosen as `webauthn-example.geo`. The client argument is the constant value `true`, since the
The extension identifier is chosen as `webauthnExampleGeo`. The client argument is the constant value `true`, since the
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">
var assertionPromise =
credentials.getAssertion("SGFuIFNvbG8gc2hvdCBmaXJzdC4",
{}, /* Empty filter */
{ 'webauthn-example.geo': true });
{ 'webauthnExampleGeo': true });
</pre>

The extension defines the additional client data to be the client's location, if known, as a GeoJSON [[GeoJSON]] point. The
Expand All @@ -1531,7 +1529,7 @@ client constructs the following client data:
{
...,
'extensions': {
'webauthn-example.geo': {
'webauthnExampleGeo': {
'type': 'Point',
'coordinates': [65.059962, -13.993041]
}
Expand All @@ -1550,10 +1548,9 @@ authenticator does this by including it in the `authenticatorData`. As an exampl
81 (hex) -- Flags, ED and TUP both set.
20 05 58 1F -- Signature counter
A1 -- CBOR map of one element
74 -- Key 1: CBOR text string of 20 bytes
77 65 62 61 75 74 68 6e 2d 65 78
61 6d 70 6c 65 2e 67 65 6f -- "webauthn-example.geo" UTF-8 string

72 -- Key 1: CBOR text string of 18 bytes
77 65 62 61 75 74 68 6e 45 78 61
6d 70 6c 65 47 65 6f -- "webauthnExampleGeo" UTF-8 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 @@ -1572,7 +1569,7 @@ This authentication extension allows for a simple form of transaction authorizat
intended for display on a trusted device on the authenticator.

: Extension identifier
:: `webauthn.txauth.simple`
:: `webauthnTxAuthSimple`

: Client argument
:: A single UTF-8 encoded string prompt.
Expand All @@ -1594,7 +1591,7 @@ The generic version of this extension allows images to be used as prompts as wel
rendering engine to be used and also supports a richer visual appearance.

: Extension identifier
:: `webauthn.txauth.generic`
:: `webauthnTxAuthGeneric`

: Client argument
:: A CBOR map with one pair of data items (CBOR tagged as 0xa1). The pair of data items consists of
Expand Down Expand Up @@ -1623,7 +1620,7 @@ This registration extension allows a [RP] to guide the selection of the authenti
credential. It is intended primarily for [RPS] that wish to tightly control the experience around credential creation.

: Extension identifier
:: `webauthn.authn-sel`
:: `webauthnAuthnSel`

: Client argument
:: A sequence of AAGUIDs:
Expand Down Expand Up @@ -1658,7 +1655,7 @@ credential. It is intended primarily for [RPS] that wish to tightly control the
## AAGUID Extension ## {#aaguid-extension}

: Extension identifier
:: `webauthn.aaguid`
:: `webauthnAaguid`

: Client argument
:: The Boolean value `true` to indicate that this extension is requested by the [RP].
Expand Down Expand Up @@ -1694,7 +1691,7 @@ credential. It is intended primarily for [RPS] that wish to tightly control the
## SupportedExtensions Extension ## {#supported-extensions-extension}

: Extension identifier
:: `webauthn.exts`
:: `webauthnExts`

: Client argument
:: The Boolean value `true` to indicate that this extension is requested by the [RP].
Expand All @@ -1716,7 +1713,7 @@ credential. It is intended primarily for [RPS] that wish to tightly control the
## User Verification Index (UVI) Extension ## {#uvi-extension}

: Extension identifier
:: `webauthn.uvi`
:: `webauthnUvi`

: Client argument
:: The Boolean value `true` to indicate that this extension is requested by the [RP].
Expand Down Expand Up @@ -1753,8 +1750,8 @@ credential. It is intended primarily for [RPS] that wish to tightly control the
00 00 00 01 -- (initial) signature counter
... -- 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 69 -- "webauthn.uvi" UTF-8 string
6B -- Key 1: CBOR text string of 11 bytes
77 65 62 61 75 74 68 6E 55 76 69 -- "webauthnUvi" UTF-8 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

0 comments on commit 9de3a98

Please sign in to comment.