Interface CredentialRepositoryV2<C extends CredentialRecord>
This is used by RelyingPartyV2 to look up credentials and credential IDs.
Unlike CredentialRepository, this interface does not require support for usernames.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancredentialIdExists(ByteArray credentialId) Deprecated.EXPERIMENTAL: This is an experimental feature.Set<? extends ToPublicKeyCredentialDescriptor>getCredentialDescriptorsForUserHandle(ByteArray userHandle) Deprecated.EXPERIMENTAL: This is an experimental feature.Deprecated.EXPERIMENTAL: This is an experimental feature.
-
Method Details
-
getCredentialDescriptorsForUserHandle
@Deprecated Set<? extends ToPublicKeyCredentialDescriptor> getCredentialDescriptorsForUserHandle(ByteArray userHandle) Deprecated.EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted before reaching a mature release.Get the credential IDs of all credentials registered to the user with the given user handle.After a successful registration ceremony, the
RegistrationResult.getKeyId()method returns a value suitable for inclusion in this set.Note that the
CredentialRecordinterface extends from the expectedToPublicKeyCredentialDescriptorreturn type, so this method MAY return aSetof the same item type as the value returned by thelookup(ByteArray, ByteArray)method.Implementations MUST NOT return null. The returned
SetMUST NOT contain null.- Returns:
- a
Setcontaining onePublicKeyCredentialDescriptor(or value that implementsToPublicKeyCredentialDescriptor, for exampleCredentialRecord) for each credential registered to the given user. The set MUST NOT be null, but MAY be empty if the user does not exist or has no credentials. - See Also:
-
lookup
Deprecated.EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted before reaching a mature release.Look up the public key, backup flags and current signature count for the given credential registered to the given user.The returned
CredentialRecordis not expected to be long-lived. It may be read directly from a database or assembled from other components.- Returns:
- a
CredentialRecorddescribing the current state of the registered credential with credential IDcredentialId, if any. If the credential does not exist or is registered to a different user handle thanuserHandle, returnOptional.empty().
-
credentialIdExists
Deprecated.EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted before reaching a mature release.Check whether any credential exists with the given credential ID, regardless of what user it is registered to.This is used to refuse registration of duplicate credential IDs.
- Returns:
trueif and only if the credential database contains at least one credential with the given credential ID.
-