java.lang.Object
com.webauthn4j.authenticator.CoreAuthenticatorImpl
com.webauthn4j.credential.CoreCredentialRecordImpl
com.webauthn4j.credential.CredentialRecordImpl
- All Implemented Interfaces:
Authenticator,CoreAuthenticator,CoreCredentialRecord,CredentialRecord
Implementation of the
CredentialRecord interface representing a WebAuthn (Passkey) credential record.
This class extends CoreCredentialRecordImpl and adds WebAuthn (Passkey) specific capabilities including
collected client data, client extensions, and authenticator transport information.-
Constructor Summary
ConstructorsConstructorDescriptionCredentialRecordImpl(@NotNull AttestationObject attestationObject, @Nullable CollectedClientData clientData, @Nullable AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput> clientExtensions, @Nullable Set<AuthenticatorTransport> transports) Constructs a new CredentialRecordImpl from the attestation object and WebAuthn (Passkey) specific data.CredentialRecordImpl(@NotNull AttestationStatement attestationStatement, @Nullable Boolean uvInitialized, @Nullable Boolean backupEligible, @Nullable Boolean backupState, long counter, @NotNull AttestedCredentialData attestedCredentialData, @NotNull AuthenticationExtensionsAuthenticatorOutputs<RegistrationExtensionAuthenticatorOutput> authenticatorExtensions, @Nullable CollectedClientData clientData, @Nullable AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput> clientExtensions, @Nullable Set<AuthenticatorTransport> transports) Constructs a new CredentialRecordImpl with explicitly specified parameters for both core credential properties and WebAuthn (Passkey) specific data. -
Method Summary
Modifier and TypeMethodDescriptionboolean}@Nullable CollectedClientData}Returns the client extensions@Nullable Set<AuthenticatorTransport>Returns theAuthenticatorTransportSetinthashCode()}Methods inherited from class com.webauthn4j.credential.CoreCredentialRecordImpl
isBackedUp, isBackupEligible, isUvInitialized, setBackedUp, setBackupEligible, setUvInitializedMethods 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, setCounterMethods inherited from interface com.webauthn4j.credential.CoreCredentialRecord
isBackedUp, isBackupEligible, isUvInitialized, setBackedUp, setBackupEligible, setUvInitialized
-
Constructor Details
-
CredentialRecordImpl
public CredentialRecordImpl(@NotNull @NotNull AttestationObject attestationObject, @Nullable @Nullable CollectedClientData clientData, @Nullable @Nullable AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput> clientExtensions, @Nullable @Nullable Set<AuthenticatorTransport> transports) Constructs a new CredentialRecordImpl from the attestation object and WebAuthn (Passkey) specific data.- Parameters:
attestationObject- the attestation object containing authenticator data and attestation statementclientData- the client data collected during the credential creation process, may be nullclientExtensions- the client extension outputs from the credential creation process, may be nulltransports- the set of authenticator transport methods supported, may be null
-
CredentialRecordImpl
public CredentialRecordImpl(@NotNull @NotNull AttestationStatement attestationStatement, @Nullable @Nullable Boolean uvInitialized, @Nullable @Nullable Boolean backupEligible, @Nullable @Nullable Boolean backupState, long counter, @NotNull @NotNull AttestedCredentialData attestedCredentialData, @NotNull @NotNull AuthenticationExtensionsAuthenticatorOutputs<RegistrationExtensionAuthenticatorOutput> authenticatorExtensions, @Nullable @Nullable CollectedClientData clientData, @Nullable @Nullable AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput> clientExtensions, @Nullable @Nullable Set<AuthenticatorTransport> transports) Constructs a new CredentialRecordImpl with explicitly specified parameters for both core credential properties and WebAuthn (Passkey) specific data.- 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, must not be nullclientData- the client data collected during the credential creation process, may be nullclientExtensions- the client extension outputs from the credential creation process, may be nulltransports- the set of authenticator transport methods supported, may be null
-
-
Method Details
-
getClientData
}- Specified by:
getClientDatain interfaceCredentialRecord- Returns:
- client data. `null` if no data is available(for backward compatibility).
-
getClientExtensions
@Nullable public @Nullable AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput> getClientExtensions()Returns the client extensions}- Specified by:
getClientExtensionsin interfaceAuthenticator- Returns:
- the client extensions
-
getTransports
Returns theAuthenticatorTransportSet}- Specified by:
getTransportsin interfaceAuthenticator- Returns:
- the
AuthenticatorTransportSet
-
equals
}- Overrides:
equalsin classCoreCredentialRecordImpl
-
hashCode
public int hashCode()}- Overrides:
hashCodein classCoreCredentialRecordImpl
-