Package io.quarkus.security.webauthn
Class WebAuthnCredentialRecord
java.lang.Object
com.webauthn4j.authenticator.CoreAuthenticatorImpl
com.webauthn4j.credential.CoreCredentialRecordImpl
com.webauthn4j.credential.CredentialRecordImpl
io.quarkus.security.webauthn.WebAuthnCredentialRecord
- All Implemented Interfaces:
com.webauthn4j.authenticator.Authenticator,com.webauthn4j.authenticator.CoreAuthenticator,com.webauthn4j.credential.CoreCredentialRecord,com.webauthn4j.credential.CredentialRecord
public class WebAuthnCredentialRecord
extends com.webauthn4j.credential.CredentialRecordImpl
This is the internal WebAuthn4J representation for a credential record, augmented with
a user name. One user name can be shared among multiple credential records, but each
credential record has a unique credential ID.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRecord holding all the required persistent fields for logging back someone over WebAuthn. -
Constructor Summary
ConstructorsConstructorDescriptionWebAuthnCredentialRecord(String username, com.webauthn4j.data.attestation.AttestationObject attestationObject, com.webauthn4j.data.client.CollectedClientData clientData, com.webauthn4j.data.extension.client.AuthenticationExtensionsClientOutputs<com.webauthn4j.data.extension.client.RegistrationExtensionClientOutput> clientExtensions, Set<com.webauthn4j.data.AuthenticatorTransport> transports) -
Method Summary
Modifier and TypeMethodDescriptionstatic WebAuthnCredentialRecordReassembles a credential record from the given required persisted fields.longThe increasing signature counter for usage of this credential record.The unique credential ID for this record.Returns the fields of this credential record that are necessary to persist for your users to be able to log back in using WebAuthn.The username for this credential recordMethods inherited from class com.webauthn4j.credential.CredentialRecordImpl
equals, getClientData, getClientExtensions, getTransports, hashCodeMethods inherited from class com.webauthn4j.credential.CoreCredentialRecordImpl
isBackedUp, isBackupEligible, isUvInitialized, setBackedUp, setBackupEligible, setUvInitializedMethods inherited from class com.webauthn4j.authenticator.CoreAuthenticatorImpl
createFromCoreRegistrationData, getAttestationStatement, getAttestedCredentialData, getAuthenticatorExtensions, 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, setCounterMethods inherited from interface com.webauthn4j.credential.CoreCredentialRecord
isBackedUp, isBackupEligible, isUvInitialized, setBackedUp, setBackupEligible, setUvInitialized
-
Constructor Details
-
WebAuthnCredentialRecord
public WebAuthnCredentialRecord(String username, com.webauthn4j.data.attestation.AttestationObject attestationObject, com.webauthn4j.data.client.CollectedClientData clientData, com.webauthn4j.data.extension.client.AuthenticationExtensionsClientOutputs<com.webauthn4j.data.extension.client.RegistrationExtensionClientOutput> clientExtensions, Set<com.webauthn4j.data.AuthenticatorTransport> transports)
-
-
Method Details
-
getCounter
public long getCounter()The increasing signature counter for usage of this credential record. See https://w3c.github.io/webauthn/#signature-counter- Specified by:
getCounterin interfacecom.webauthn4j.authenticator.CoreAuthenticator- Overrides:
getCounterin classcom.webauthn4j.authenticator.CoreAuthenticatorImpl- Returns:
- The increasing signature counter.
-
getUsername
The username for this credential record- Returns:
- the username for this credential record
-
getCredentialID
The unique credential ID for this record. This is a convenience method returning a Base64Url-encoded version ofgetAttestedCredentialData().getCredentialId()- Returns:
- The unique credential ID for this record
-
getRequiredPersistedData
Returns the fields of this credential record that are necessary to persist for your users to be able to log back in using WebAuthn.- Returns:
- the fields required to be persisted.
-
fromRequiredPersistedData
public static WebAuthnCredentialRecord fromRequiredPersistedData(WebAuthnCredentialRecord.RequiredPersistedData persistedData) Reassembles a credential record from the given required persisted fields.- Parameters:
persistedData- the required fields to be able to log back in with WebAuthn.- Returns:
- the internal representation of a WebAuthn credential record.
-