java.lang.Object
com.webauthn4j.authenticator.CoreAuthenticatorImpl
com.webauthn4j.credential.CoreCredentialRecordImpl
- All Implemented Interfaces:
CoreAuthenticator,CoreCredentialRecord
- Direct Known Subclasses:
CredentialRecordImpl
Implementation of the
CoreCredentialRecord interface representing a FIDO CTAP2 credential record.
This class provides core functionality for managing credential data, user verification status,
backup eligibility, and backup state.-
Constructor Summary
ConstructorsConstructorDescriptionCoreCredentialRecordImpl(@NotNull AttestationObject attestationObject) Constructs a new CoreCredentialRecordImpl from an attestation object.CoreCredentialRecordImpl(@Nullable AttestationStatement attestationStatement, @Nullable Boolean uvInitialized, @Nullable Boolean backupEligible, @Nullable Boolean backupState, long counter, @NotNull AttestedCredentialData attestedCredentialData, @Nullable AuthenticationExtensionsAuthenticatorOutputs<RegistrationExtensionAuthenticatorOutput> authenticatorExtensions) Constructs a new CoreCredentialRecordImpl with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()Gets the backup state of this credential.Gets the backup eligibility status of this credential.Gets the user verification (UV) initialization status of this credential.voidsetBackedUp(boolean value) Sets the backup state of this credential.voidsetBackupEligible(boolean value) Sets the backup eligibility status of this credential.voidsetUvInitialized(boolean value) Sets the user verification (UV) initialization status of this credential.Methods inherited from class com.webauthn4j.authenticator.CoreAuthenticatorImpl
createFromCoreRegistrationData, getAttestationStatement, getAttestedCredentialData, getAuthenticatorExtensions, getCounter, setAttestationStatement, setAttestedCredentialData, setAuthenticatorExtensions, setCounterMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.webauthn4j.authenticator.CoreAuthenticator
getAttestationStatement, getAttestedCredentialData, getAuthenticatorExtensions, getCounter, setCounter
-
Constructor Details
-
CoreCredentialRecordImpl
Constructs a new CoreCredentialRecordImpl from an attestation object. This constructor extracts necessary information from the attestation object including attested credential data, attestation statement, sign count, and flags.- Parameters:
attestationObject- the attestation object containing credential data and flags
-
CoreCredentialRecordImpl
public CoreCredentialRecordImpl(@Nullable @Nullable AttestationStatement attestationStatement, @Nullable @Nullable Boolean uvInitialized, @Nullable @Nullable Boolean backupEligible, @Nullable @Nullable Boolean backupState, long counter, @NotNull @NotNull AttestedCredentialData attestedCredentialData, @Nullable @Nullable AuthenticationExtensionsAuthenticatorOutputs<RegistrationExtensionAuthenticatorOutput> authenticatorExtensions) Constructs a new CoreCredentialRecordImpl with the specified parameters. This constructor allows explicit setting of all credential record properties.- Parameters:
attestationStatement- the attestation statement, may be nulluvInitialized- the user verification initialization status, may be null for backward compatibilitybackupEligible- the backup eligibility status, may be null for backward compatibilitybackupState- the backup state, may be null for backward compatibilitycounter- the signature counter valueattestedCredentialData- the attested credential data, must not be nullauthenticatorExtensions- the authenticator extensions, may be null
-
-
Method Details
-
isUvInitialized
Gets the user verification (UV) initialization status of this credential.- Specified by:
isUvInitializedin interfaceCoreCredentialRecord- Returns:
- `true` if user verification is initialized, `false` if user verification is not initialized, `null` if no data is available (for backward compatibility).
-
setUvInitialized
public void setUvInitialized(boolean value) Sets the user verification (UV) initialization status of this credential.- Specified by:
setUvInitializedin interfaceCoreCredentialRecord- Parameters:
value- `true` to set the credential as user verification initialized, `false` otherwise.
-
isBackupEligible
Gets the backup eligibility status of this credential.- Specified by:
isBackupEligiblein interfaceCoreCredentialRecord- Returns:
- `true` if this credential is backup eligible, `false` if it is NOT backup eligible, `null` if no data is available (for backward compatibility).
-
setBackupEligible
public void setBackupEligible(boolean value) Sets the backup eligibility status of this credential.- Specified by:
setBackupEligiblein interfaceCoreCredentialRecord- Parameters:
value- `true` to mark the credential as backup eligible, `false` otherwise.
-
isBackedUp
Gets the backup state of this credential.- Specified by:
isBackedUpin interfaceCoreCredentialRecord- Returns:
- `true` if this credential is backed up, `false` if it is NOT backed up, `null` if no data is available (for backward compatibility).
-
setBackedUp
public void setBackedUp(boolean value) Sets the backup state of this credential.- Specified by:
setBackedUpin interfaceCoreCredentialRecord- Parameters:
value- `true` to mark the credential as backed up, `false` otherwise.
-
equals
- Overrides:
equalsin classCoreAuthenticatorImpl
-
hashCode
public int hashCode()- Overrides:
hashCodein classCoreAuthenticatorImpl
-