Re: [webauthn] Add new getClientCapabilities method (#1923)

Ok, let's hear some more opinions before we decide either way (keep `isPPAA()`, keep `getCC()` or keep both).

In the meantime, this just occurred to me: perhaps instead of a list of values, this should be structured as object attributes like the [`credProps` output](https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#dictdef-credentialpropertiesoutput)?

Say that we add a new capability value for a feature that already exists in some clients. Some clients immediately update and start reporting the new enum value, but some clients are slower to update and for a while don't report the new value - even though they do in fact support the feature. This leads RPs to incorrectly conclude that the feature isn't available.

So perhaps it would be better to structure the data model like this?

```
partial interface PublicKeyCredential {
    static Promise<ClientCapabilities> getClientCapabilities();
};
dictionary ClientCapabilities {
    boolean hybridTransport;
    // Additional properties can be added here
};
```

so then, if `cap = await getClientCapabilities()`:

- `cap["feature"] === true`: `feature` is known to be supported
- `cap["feature"] === false`: `feature` is known to be not supported
- `cap["feature"] === undefined`: `feature` availability is unknown

-- 
GitHub Notification of comment by emlun
Please view or discuss this issue at https://github.com/w3c/webauthn/pull/1923#issuecomment-1653784078 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 27 July 2023 14:54:10 UTC