Package com.yubico.webauthn
Class RegisteredCredential
- java.lang.Object
-
- com.yubico.webauthn.RegisteredCredential
-
public final class RegisteredCredential extends java.lang.ObjectAn 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 classRegisteredCredential.RegisteredCredentialBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RegisteredCredential.RegisteredCredentialBuilder.MandatoryStagesbuilder()booleanequals(java.lang.Object o)@NonNull ByteArraygetCredentialId()The credential ID of the credential.@NonNull ByteArraygetPublicKeyCose()The credential public key encoded in COSE_Key format, as defined in Section 7 of RFC 8152.longgetSignatureCount()The stored signature count of the credential.@NonNull ByteArraygetUserHandle()The user handle of the user the credential is registered to.inthashCode()RegisteredCredential.RegisteredCredentialBuildertoBuilder()java.lang.StringtoString()
-
-
-
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 counterin authentication assertions.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-