Package com.yubico.webauthn
Class RegisteredCredential
- java.lang.Object
-
- com.yubico.webauthn.RegisteredCredential
-
public final class RegisteredCredential extends java.lang.Object
An abstraction of a credential registered to a particular user.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RegisteredCredential.RegisteredCredentialBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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()
RegisteredCredential.RegisteredCredentialBuilder
toBuilder()
java.lang.String
toString()
-
-
-
Method Detail
-
builder
public static RegisteredCredential.RegisteredCredentialBuilder.MandatoryStages builder()
-
toBuilder
public RegisteredCredential.RegisteredCredentialBuilder toBuilder()
-
getCredentialId
@NonNull public @NonNull ByteArray getCredentialId()
The credential ID of the credential.
-
getUserHandle
@NonNull public @NonNull ByteArray getUserHandle()
The user handle of the user the credential is registered to.- See Also:
- User Handle,
UserIdentity.getId()
-
getPublicKeyCose
@NonNull public @NonNull ByteArray getPublicKeyCose()
-
getSignatureCount
public long getSignatureCount()
The stored signature count of the credential.This is used to validate the
signature counter
in authentication assertions.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-