Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new getClientCapabilities method #1923

Merged
merged 30 commits into from
Jan 10, 2024
Merged
Changes from 5 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4cc0670
add getClientCapabilites method and enum
timcappalli Jul 18, 2023
9214c75
add "the"
timcappalli Jul 26, 2023
5e47920
change enum to ClientCapability for consistency
timcappalli Jul 26, 2023
1600f58
add note about enum not being referenced
timcappalli Jul 26, 2023
450959b
updated interface to sequence of DOMStrings
timcappalli Jul 26, 2023
968040a
remove client-pin-entry per 2023-07-26 call
timcappalli Jul 26, 2023
6931dad
change to dict and add new values
timcappalli Aug 1, 2023
7307162
remove isPasskeyPlatformAuthenticatorAvailable
timcappalli Aug 1, 2023
baa930a
s/ClientCapability/ClientCapabilities
timcappalli Aug 2, 2023
9606e71
Merge branch 'tc-clientfeatmethod' into tc-remove-isPPAA
MasterKale Aug 9, 2023
82ec494
Merge pull request #1936 from w3c/tc-remove-isPPAA
timcappalli Aug 9, 2023
633a2da
first stab at new approach for getClientCapabilities
timcappalli Sep 6, 2023
244b54e
missing quote
timcappalli Sep 6, 2023
1fe9179
add SecureContext to result
timcappalli Sep 6, 2023
5c39e19
spelling
timcappalli Sep 7, 2023
699e9d1
add conditional-create
timcappalli Sep 7, 2023
53e8d8c
Incorporate Emil's changes
timcappalli Sep 29, 2023
b27eb4d
address AGL global namespace feedback
timcappalli Oct 27, 2023
ecc19d4
first pass at privacy considerations
timcappalli Dec 11, 2023
594e338
John's feedback
timcappalli Dec 11, 2023
75b9061
Merge branch 'main' into tc-clientfeatmethod
MasterKale Jan 3, 2024
a3fd6fd
Replace "maplike" with "record"
MasterKale Jan 3, 2024
a856b6d
Switch to camelCase for capability names
MasterKale Jan 3, 2024
4969d28
Prune readonly from record
MasterKale Jan 3, 2024
b0fdc69
Switch to a typedef
MasterKale Jan 3, 2024
903620e
Remove key sorting requirement
MasterKale Jan 5, 2024
ee7990c
Add link to Disclocing Client Capabilities section
MasterKale Jan 8, 2024
f6d2eb5
Restore mandate to sort capabilities
MasterKale Jan 9, 2024
803fa75
Lexicographically sort ClientCapability
MasterKale Jan 9, 2024
ef54380
Allow clients to omit capabilities
MasterKale Jan 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 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<sequence<DOMString>> 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,26 @@ Note: The {{UserVerificationRequirement}} enumeration is deliberately not refere
interest of minimizing disruption to the user interaction flow).
</div>

### Client Capability Enumeration (enum <dfn enum>ClientCapability</dfn>) ### {#enum-clientCapability}

<xmp class="idl">
enum ClientCapability {
"hybrid-transport",
nsatragno marked this conversation as resolved.
Show resolved Hide resolved
"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.

timcappalli marked this conversation as resolved.
Show resolved Hide resolved
Note: The {{ClientCapability}} enumeration is deliberately not referenced, see [[#sct-domstring-backwards-compatibility]].

<div dfn-type="enum-value" dfn-for="ClientCapability">
: <dfn>hybrid-transport</dfn>
:: The [=WebAuthn Client=] supports the {{AuthenticatorTransport/hybrid}} transport.
MasterKale marked this conversation as resolved.
Show resolved Hide resolved

: <dfn>client-pin-entry</dfn>
:: The [=WebAuthn Client=] supports PIN entry for [=user verification=] or other [=authenticator=] operations.
MasterKale marked this conversation as resolved.
Show resolved Hide resolved
</div>

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

Expand Down