Interface CredentialRepository
This is used by RelyingParty
to look up credentials, usernames and user handles from
usernames, user handles and credential IDs.
-
Method Summary
Modifier and TypeMethodDescriptiongetCredentialIdsForUsername
(String username) Get the credential IDs of all credentials registered to the user with the given username.getUserHandleForUsername
(String username) Get the user handle corresponding to the given username - the inverse ofgetUsernameForUserHandle(ByteArray)
.getUsernameForUserHandle
(ByteArray userHandle) Get the username corresponding to the given user handle - the inverse ofgetUserHandleForUsername(String)
.Look up the public key and stored signature count for the given credential registered to the given user.Look up all credentials with the given credential ID, regardless of what user they're registered to.
-
Method Details
-
getCredentialIdsForUsername
Get the credential IDs of all credentials registered to the user with the given username.After a successful registration ceremony, the
RegistrationResult.getKeyId()
method returns a value suitable for inclusion in this set. -
getUserHandleForUsername
Get the user handle corresponding to the given username - the inverse ofgetUsernameForUserHandle(ByteArray)
.Used to look up the user handle based on the username, for authentication ceremonies where the username is already given.
-
getUsernameForUserHandle
Get the username corresponding to the given user handle - the inverse ofgetUserHandleForUsername(String)
.Used to look up the username based on the user handle, for username-less authentication ceremonies.
-
lookup
Look up the public key and stored signature count for the given credential registered to the given user.The returned
RegisteredCredential
is not expected to be long-lived. It may be read directly from a database or assembled from other components. -
lookupAll
Look up all credentials with the given credential ID, regardless of what user they're registered to.This is used to refuse registration of duplicate credential IDs. Therefore, under normal circumstances this method should only return zero or one credential (this is an expected consequence, not an interface requirement).
-