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

Clarify connection between credential record and PublicKeyCredentialDescriptor #2031

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Changes from all commits
Commits
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
17 changes: 10 additions & 7 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3828,33 +3828,36 @@ Note: The {{PublicKeyCredentialType}} enumeration is deliberately not referenced
This dictionary identifies a specific [=public key credential=].
It is used in {{CredentialsContainer/create()}} to prevent creating duplicate credentials on the same [=authenticator=],
and in {{CredentialsContainer/get()}} to determine if and how the credential can currently be reached by the [=client=].
It mirrors some fields of the {{PublicKeyCredential}} object returned by

The [=credential descriptor for a credential record=] is a subset of the properties of that [=credential record=],
and mirrors some fields of the {{PublicKeyCredential}} object returned by
{{CredentialsContainer/create()}} and {{CredentialsContainer/get()}}.

<div dfn-type="dict-member" dfn-for="PublicKeyCredentialDescriptor">
: <dfn>type</dfn>
:: This member contains the type of the [=public key credential=] the caller is referring to. The value SHOULD be a member of {{PublicKeyCredentialType}} but [=client platforms=] MUST ignore any {{PublicKeyCredentialDescriptor}} with an unknown {{PublicKeyCredentialDescriptor/type}}.

This SHOULD be set to the value of the [$credential record/type$] item of the [=credential record=]
representing the identified [=public key credential source=].
This mirrors the {{Credential/type}} field of {{PublicKeyCredential}}.

Note: If all {{PublicKeyCredentialDescriptor}} elements in {{PublicKeyCredentialRequestOptions/allowCredentials}} are ignored then that MUST result in an error since an empty {{PublicKeyCredentialRequestOptions/allowCredentials}} is semantically distinct.

: <dfn>id</dfn>
:: This member contains the [=credential ID=] of the [=public key credential=] the caller is referring to.

This SHOULD be set to the value of the [$credential record/id$] item of the [=credential record=]
representing the identified [=public key credential source=].
This mirrors the {{PublicKeyCredential/rawId}} field of {{PublicKeyCredential}}.

: <dfn>transports</dfn>
:: This OPTIONAL member contains a hint as to how the [=client=] might communicate with the [=managing authenticator=] of the
[=public key credential=] the caller is referring to. The values SHOULD be members of {{AuthenticatorTransport}} but [=client platforms=] MUST ignore unknown values.

This SHOULD be set to the value of the [$credential record/transports$] item of the [=credential record=]
representing the identified [=public key credential source=].
This mirrors the <code>{{PublicKeyCredential/response}}.{{AuthenticatorAttestationResponse/getTransports()}}</code> method
of a {{PublicKeyCredential}} structure created by a {{CredentialsContainer/create()}} operation.
When [[#sctn-registering-a-new-credential|registering a new credential]],
the [=[RP]=] SHOULD store the value returned from {{AuthenticatorAttestationResponse/getTransports()}}.
When creating a {{PublicKeyCredentialDescriptor}} for that credential,
the [=[RP]=] SHOULD retrieve that stored value
and set it as the value of the {{PublicKeyCredentialDescriptor/transports}} member.
of the {{PublicKeyCredential}} structure created by a {{CredentialsContainer/create()}} operation.
</div>


Expand Down
Loading