Skip to content

Commit

Permalink
Add feature detection for RPs to determine what is supported on the c…
Browse files Browse the repository at this point in the history
…lient.
  • Loading branch information
Jason Fisher committed May 15, 2019
1 parent db94f4a commit ff791f6
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions index.bs
Expand Up @@ -46,6 +46,7 @@ Former Editor: Angelo Liao, w3cid 94342, Microsoft, huliao@microsoft.com
!Contributors: <a href="mailto:mkwst@google.com">Mike West</a> (Google)
!Contributors: <a href="mailto:jyasskin@google.com">Jeffrey Yasskin</a> (Google)
!Contributors: <a href="mailto:sweeden@au1.ibm.com">Shane Weeden</a> (IBM)
!Contributors: <a href="mailto:jafisher@microsoft.com">Jason Fisher</a> (Microsoft)
group: webauthn
Issue Tracking: GitHub https://github.com/w3c/webauthn/issues
!Tests: <a href=https://github.com/web-platform-tests/wpt/tree/master/webauthn>web-platform-tests webauthn/</a> (<a href=https://github.com/web-platform-tests/wpt/labels/webauthn>ongoing work</a>)
Expand Down Expand Up @@ -1776,6 +1777,29 @@ This [=internal method=] accepts no arguments.

</div>

### Availability of [=User-Verifying Platform Authenticator=] (enum <dfn enum>UserVerifyingPlatformAuthenticatorAvailability</dfn>) ### {#enum-userVerifyingPlatformAuthenticatorAvailability}

<xmp class="idl">
enum UserVerifyingPlatformAuthenticatorAvailability {
"enabled",
"disabled",
"unavailable"
};
</xmp>

This enumeration's values describe the availability of a [=User-Verifying Platform Authenticator=] on the [=client platform=].

<div dfn-type="enum-value" dfn-for="UserVerifyingPlatformAuthenticatorAvailability">
: <dfn>enabled</dfn>
:: This value indicates that a [=User-Verifying Platform Authenticator=] is available and enabled on the [=client platform=].

: <dfn>disabled</dfn>
:: This value indicates that a [=User-Verifying Platform Authenticator=] is available, but not enabled on the [=client platform=].

: <dfn>unavailable</dfn>
:: This value indicates that a [=User-Verifying Platform Authenticator=] is not available on the [=client platform=].
</div>

### Availability of [=User-Verifying Platform Authenticator=] - PublicKeyCredential's `isUserVerifyingPlatformAuthenticatorAvailable()` Method ### {#sctn-isUserVerifyingPlatformAuthenticatorAvailable}

<div link-for-hint="WebAuthentication/isUserVerifyingPlatformAuthenticatorAvailable">
Expand All @@ -1798,6 +1822,66 @@ Note: Invoking this method from a [=browsing context=] where the [=Web Authentic

</div>

### Client Supported Capabilities (dictionary <dfn dictionary>SupportedCapabilities</dfn>) ### {#dictionary-supportedcapabilities}

<xmp class="idl">
dictionary SupportedCapabilities {
boolean areU2FDevicesSupported;
boolean areCTAPDevicesSupported;
boolean areResidentKeysSupported;
boolean isUserVerificationSupported;
boolean isTokenBindingSupported;
UserVerifyingPlatformAuthenticatorAvailability userVerifyingPlatformAuthenticatorAvailability;
sequence<AuthenticatorTransport> transportsSupported;
sequence<DOMString> extensionsSupported;
};
</xmp>

This dictionary is used by [=[WRPS]=] to determine the supported capabilities of the [=client=].

<div dfn-type="dict-member" dfn-for="SupportedCapabilities">
: <dfn>areU2FDevicesSupported</dfn>
:: This attribute indicates whether the [=client=] supports communicating with [[FIDO-U2F-Message-Formats]] devices.

: <dfn>areCTAPDevicesSupported</dfn>
:: This attribute indicates whether the [=client=] supports communicating with [[FIDO-CTAP]] devices.

: <dfn>areResidentKeysSupported</dfn>
:: This attribute indicates whether the [=client=] supports creating [=resident credentials=].

: <dfn>isUserVerificationSupported</dfn>
:: This attribute indicates whether the [=client=] supports [=user verification=].

: <dfn>isTokenBindingSupported</dfn>
:: This attribute indicates whether the [=client=] supports the [=Token Binding=] protocol.

: <dfn>userVerifyingPlatformAuthenticatorAvailability</dfn>
:: This attribute indicates the availability of a [=user-verifying platform authenticator=] on the [=client=].

: <dfn>transportsSupported</dfn>
:: This attribute indicates the {{AuthenticatorTransport}} values supported by the [=client=].

: <dfn>extensionsSupported</dfn>
:: This attribute indicates the [=extension identifiers=] supported by the [=client=].
</div>

### Capability Support - PublicKeyCredential's `getSupportedCapabilities()` Method ### {#sctn-getSupportedCapabilities}

<div link-for-hint="WebAuthentication/getSupportedCapabilities">

[=[WRPS]=] use this method to determine what capabilities are supported by the [=client=].
Upon invocation, the [=client=] employs a [=client platform=]-specific procedure to discover supported capabilities.
The promise is resolved with the capabilities that are supported.
Based on the result, the [=[RP]=] can take further actions to guide the user to create a credential.

This method has no arguments and returns a {{SupportedCapabilities}} value.

<xmp class="idl">
partial interface PublicKeyCredential {
static Promise<SupportedCapabilities> getSupportedCapabilities();
};
</xmp>

## Authenticator Responses (interface <dfn interface>AuthenticatorResponse</dfn>) ## {#iface-authenticatorresponse}

[=Authenticators=] respond to [=[RP]=] requests by returning an object derived from the
Expand Down

0 comments on commit ff791f6

Please sign in to comment.