Class AssertionResult
- java.lang.Object
-
- com.yubico.webauthn.AssertionResult
-
public final class AssertionResult extends java.lang.Object
The result of a call toRelyingParty.finishAssertion(FinishAssertionOptions)
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(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.RegisteredCredential
getCredential()
TheRegisteredCredential
that was returned byCredentialRepository.lookup(ByteArray, ByteArray)
and whose public key was used to successfully verify the assertion signature.ByteArray
getCredentialId()
Deprecated.UsegetCredential()
.getCredentialId()
instead.long
getSignatureCount()
The new signature count of the credential used for the assertion.ByteArray
getUserHandle()
Deprecated.UsegetCredential()
.getUserHandle()
instead.@NonNull java.lang.String
getUsername()
The username of the authenticated user.int
hashCode()
boolean
isBackedUp()
Deprecated.EXPERIMENTAL: This feature is from a not yet mature standard; it could change as the standard matures.boolean
isBackupEligible()
Deprecated.EXPERIMENTAL: This feature is from a not yet mature standard; it could change as the standard matures.boolean
isSignatureCounterValid()
true
if and only if at least one of the following is true: Thesignature counter value
in the assertion was strictly greater thanthe stored one
.boolean
isSuccess()
true
if the assertion was verified successfully.java.lang.String
toString()
-
-
-
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
RegisteredCredential
if no value is stored yet.CredentialRepository
implementations SHOULD set this value as thebackupEligible(Boolean)
value when reconstructing thatRegisteredCredential
.- Returns:
true
if 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
.CredentialRepository
implementations SHOULD set this value as thebackupState(Boolean)
value when reconstructing thatRegisteredCredential
.- Returns:
true
if 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()
true
if the assertion was verified successfully.
-
getCredential
public RegisteredCredential getCredential()
TheRegisteredCredential
that was returned byCredentialRepository.lookup(ByteArray, ByteArray)
and whose public key was used to successfully verify the assertion signature.NOTE: The
signature count
,backup eligibility
andbackup state
properties 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()
true
if and only if at least one of the following is true:- The
signature counter value
in the assertion was strictly greater thanthe stored one
. - The
signature counter value
in the assertion andthe stored one
were both zero.
- The
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-