Skip to content

Commit

Permalink
add getClientCapabilites method and enum
Browse files Browse the repository at this point in the history
  • Loading branch information
timcappalli committed Jul 18, 2023
1 parent 5bd3dd1 commit 4cc0670
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2802,6 +2802,26 @@ Note: Invoking this method from a [=browsing context=] where the [=Web Authentic

</div>

### Get Client Capabilities - PublicKeyCredential's `getClientCapabilities()` Method ### {#sctn-getClientCapabilities}

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

[=[WRPS]=] use this method to determine the availability of a limited set of [=WebAuthn Client|client=] capabilities to offer certain workflows and experiences to users. For example, an RP may offer a sign in button on clients where only {{AuthenticatorTransport/hybrid}} transport is available (instead of showing a username field), or offer security key enrollment on [=WebAuthn Client|clients=] that support client PIN entry.

Upon invocation, the [=client=] employs a [=client platform=]-specific procedure to discover availablity of these capabilities.

This method has no arguments and returns a set of strings.

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

Note: Invoking this method from a [=browsing context=] where the [=Web Authentication API=] is "disabled" according to the [=allowed to use=] algorithm&mdash;i.e., by a [=permissions policy=]&mdash;will result in the promise being rejected with a {{DOMException}} whose name is "{{NotAllowedError}}". See also [[#sctn-permissions-policy]].

</div>

### Deserialize Registration ceremony options - PublicKeyCredential's `parseCreationOptionsFromJSON()` Method ### {#sctn-parseCreationOptionsFromJSON}

<div link-for-hint="WebAuthentication/parseCreationOptionsFromJSON">
Expand Down Expand Up @@ -3967,6 +3987,24 @@ Note: The {{UserVerificationRequirement}} enumeration is deliberately not refere
interest of minimizing disruption to the user interaction flow).
</div>

### Client Capabilities Enumeration (enum <dfn enum>ClientCapabilities</dfn>) ### {#enum-clientCapabilities}

<xmp class="idl">
enum ClientCapabilities {
"hybrid-transport",
"client-pin-entry"
};
</xmp>

This enumeration defines a limited set of client capabilities which a [=[WRP]=] may evaluate to offer certain workflows and experiences to users.

<div dfn-type="enum-value" dfn-for="ClientCapabilities">
: <dfn>hybrid-transport</dfn>
:: The [=WebAuthn Client=] supports {{AuthenticatorTransport/hybrid}} transport.

: <dfn>client-pin-entry</dfn>
:: The [=WebAuthn Client=] supports PIN entry for [=user verification=] or other [=authenticator=] operations.
</div>

## Permissions Policy integration ## {#sctn-permissions-policy}

Expand Down

0 comments on commit 4cc0670

Please sign in to comment.