Class AssertionResult
- java.lang.Object
-
- com.yubico.webauthn.AssertionResult
-
public final class AssertionResult extends java.lang.ObjectThe result of a call toRelyingParty.finishAssertion(FinishAssertionOptions).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.Optional<AuthenticatorAttachment>getAuthenticatorAttachment()Deprecated.EXPERIMENTAL: This feature is from a not yet mature standard; it could change as the standard matures.java.util.Optional<AuthenticatorAssertionExtensionOutputs>getAuthenticatorExtensionOutputs()The authenticator extension outputs, if any.java.util.Optional<ClientAssertionExtensionOutputs>getClientExtensionOutputs()The client extension outputs, if any.RegisteredCredentialgetCredential()TheRegisteredCredentialthat was returned byCredentialRepository.lookup(ByteArray, ByteArray)and whose public key was used to successfully verify the assertion signature.ByteArraygetCredentialId()Deprecated.UsegetCredential().getCredentialId()instead.longgetSignatureCount()The new signature count of the credential used for the assertion.ByteArraygetUserHandle()Deprecated.UsegetCredential().getUserHandle()instead.@NonNull java.lang.StringgetUsername()The username of the authenticated user.inthashCode()booleanisBackedUp()Deprecated.EXPERIMENTAL: This feature is from a not yet mature standard; it could change as the standard matures.booleanisBackupEligible()Deprecated.EXPERIMENTAL: This feature is from a not yet mature standard; it could change as the standard matures.booleanisSignatureCounterValid()trueif and only if at least one of the following is true: Thesignature counter valuein the assertion was strictly greater thanthe stored one.booleanisSuccess()trueif the assertion was verified successfully.java.lang.StringtoString()
-
-
-
Method Detail
-
getCredentialId
@Deprecated public ByteArray getCredentialId()
Deprecated.UsegetCredential().getCredentialId()instead.The credential ID of the credential used for the assertion.
-
getUserHandle
@Deprecated public ByteArray getUserHandle()
Deprecated.UsegetCredential().getUserHandle()instead.The user handle of the authenticated user.- See Also:
- User Handle,
UserIdentity.getId(),getUsername()
-
isBackupEligible
@Deprecated public boolean isBackupEligible()
Deprecated.EXPERIMENTAL: This feature is from a not yet mature standard; it could change as the standard matures.Check whether the asserted credential is backup eligible, using the BE flag in the authenticator data.You SHOULD store this value in your representation of the corresponding
RegisteredCredentialif no value is stored yet.CredentialRepositoryimplementations SHOULD set this value as thebackupEligible(Boolean)value when reconstructing thatRegisteredCredential.- Returns:
trueif and only if the created credential is backup eligible. NOTE that this is only a hint and not a guarantee, unless backed by a trusted authenticator attestation.- See Also:
- Backup Eligible in §4. Terminology, BE flag in §6.1. Authenticator Data
-
isBackedUp
@Deprecated public boolean isBackedUp()
Deprecated.EXPERIMENTAL: This feature is from a not yet mature standard; it could change as the standard matures.Get the current backup state of the asserted credential, using the BS flag in the authenticator data.You SHOULD update this value in your representation of a
RegisteredCredential.CredentialRepositoryimplementations SHOULD set this value as thebackupState(Boolean)value when reconstructing thatRegisteredCredential.- Returns:
trueif and only if the created credential is believed to currently be backed up. NOTE that this is only a hint and not a guarantee, unless backed by a trusted authenticator attestation.- See Also:
- Backup State in §4. Terminology, BS flag in §6.1. Authenticator Data
-
getAuthenticatorAttachment
@Deprecated public java.util.Optional<AuthenticatorAttachment> getAuthenticatorAttachment()
Deprecated.EXPERIMENTAL: This feature is from a not yet mature standard; it could change as the standard matures.The authenticator attachment modality in effect at the time the asserted credential was used.
-
getSignatureCount
public long getSignatureCount()
The new signature count of the credential used for the assertion.You should update this value in your database.
- See Also:
AuthenticatorData.getSignatureCounter()
-
getClientExtensionOutputs
public java.util.Optional<ClientAssertionExtensionOutputs> getClientExtensionOutputs()
The client extension outputs, if any.This is present if and only if at least one extension output is present in the return value.
-
getAuthenticatorExtensionOutputs
public java.util.Optional<AuthenticatorAssertionExtensionOutputs> getAuthenticatorExtensionOutputs()
The authenticator extension outputs, if any.This is present if and only if at least one extension output is present in the return value.
-
isSuccess
public boolean isSuccess()
trueif the assertion was verified successfully.
-
getCredential
public RegisteredCredential getCredential()
TheRegisteredCredentialthat was returned byCredentialRepository.lookup(ByteArray, ByteArray)and whose public key was used to successfully verify the assertion signature.NOTE: The
signature count,backup eligibilityandbackup stateproperties in this object will reflect the state before the assertion operation, not the new state. When updating your database state, use the signature counter and backup state fromgetSignatureCount(),isBackupEligible()andisBackedUp()instead.
-
getUsername
@NonNull public @NonNull java.lang.String getUsername()
The username of the authenticated user.- See Also:
getUserHandle()
-
isSignatureCounterValid
public boolean isSignatureCounterValid()
trueif and only if at least one of the following is true:- The
signature counter valuein the assertion was strictly greater thanthe stored one. - The
signature counter valuein the assertion andthe stored onewere both zero.
- The
-
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
-
-