public final class RegisteredCredential
extends java.lang.Object
Instances of this class are not expected to be long-lived, and the library only needs to read them, never write them. You may at your discretion store them directly in your database, or assemble them from other components.
| Modifier and Type | Class and Description |
|---|---|
static class |
RegisteredCredential.RegisteredCredentialBuilder |
| Modifier and Type | Method and Description |
|---|---|
static RegisteredCredential.RegisteredCredentialBuilder.MandatoryStages |
builder() |
boolean |
equals(java.lang.Object o) |
@NonNull ByteArray |
getCredentialId()
The credential
ID of the credential.
|
@NonNull ByteArray |
getPublicKeyCose()
The credential public key encoded in COSE_Key format, as defined in Section 7 of RFC 8152.
|
long |
getSignatureCount()
The stored signature
count of the credential.
|
@NonNull ByteArray |
getUserHandle()
The user handle
of the user the credential is registered to.
|
int |
hashCode() |
java.util.Optional<java.lang.Boolean> |
isBackedUp()
Deprecated.
EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
the standard matures.
|
java.util.Optional<java.lang.Boolean> |
isBackupEligible()
Deprecated.
EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
the standard matures.
|
RegisteredCredential.RegisteredCredentialBuilder |
toBuilder() |
java.lang.String |
toString() |
@Deprecated public java.util.Optional<java.lang.Boolean> isBackupEligible()
If absent, it is not known whether or not this credential is backup eligible.
If present and true, the credential is backup eligible: it can be backed up in
some way, most commonly by syncing the private key to a cloud account.
If present and false, the credential is not backup eligible: it cannot be
backed up in any way.
CredentialRepository implementations SHOULD set this to the first known value
returned by RegistrationResult.isBackupEligible() or AssertionResult.isBackupEligible(), if known. If unknown, CredentialRepository
implementations SHOULD set this to null or not set this value.
@Deprecated public java.util.Optional<java.lang.Boolean> isBackedUp()
If absent, the backup state of the credential is not known.
If present and true, the credential is believed to be currently backed up.
If present and false, the credential is believed to not be currently backed up.
CredentialRepository implementations SHOULD set this to the most recent value
returned by AssertionResult.isBackedUp() or RegistrationResult.isBackedUp(), if
known. If unknown, CredentialRepository implementations SHOULD set this to null
or not set this value.
public static RegisteredCredential.RegisteredCredentialBuilder.MandatoryStages builder()
public RegisteredCredential.RegisteredCredentialBuilder toBuilder()
@NonNull public @NonNull ByteArray getCredentialId()
@NonNull public @NonNull ByteArray getUserHandle()
UserIdentity.getId()@NonNull public @NonNull ByteArray getPublicKeyCose()
public long getSignatureCount()
This is used to validate the signature
counter in authentication assertions.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object