Class RegistrationResult
- java.lang.Object
-
- com.yubico.webauthn.RegistrationResult
-
public final class RegistrationResult extends java.lang.ObjectThe result of a call toRelyingParty.finishRegistration(FinishRegistrationOptions).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object o)ByteArraygetAaguid()Theaaguidreported in the of the created credential.java.util.Optional<java.util.List<java.security.cert.X509Certificate>>getAttestationTrustPath()The attestation trust path for the created credential, if any.@NonNull AttestationTypegetAttestationType()The attestation type that was used for the created credential.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<AuthenticatorRegistrationExtensionOutputs>getAuthenticatorExtensionOutputs()The authenticator extension outputs, if any.java.util.Optional<ClientRegistrationExtensionOutputs>getClientExtensionOutputs()The client extension outputs, if any.PublicKeyCredentialDescriptorgetKeyId()The credential ID and transports of the created credential.ByteArraygetPublicKeyCose()The public key of the created credential.longgetSignatureCount()The signature count returned with the created credential.inthashCode()booleanisAttestationTrusted()trueif and only if the attestation signature was successfully linked to a trusted attestation root.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.java.util.Optional<java.lang.Boolean>isDiscoverable()Try to determine whether the created credential is a discoverable credential, using the output from thecredPropsextension.java.lang.StringtoString()
-
-
-
Method Detail
-
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 created credential is backup eligible, using the BE flag in the authenticator data.You SHOULD store this value in your representation of a
RegisteredCredential.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 created credential, using the BS flag in the authenticator data.You SHOULD store 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 credential was created.
-
getSignatureCount
public long getSignatureCount()
The signature count returned with the created credential.This is used in
RelyingParty.finishAssertion(FinishAssertionOptions)to verify the validity of future signature counter values.- See Also:
RegisteredCredential.getSignatureCount()
-
getKeyId
public PublicKeyCredentialDescriptor getKeyId()
The credential ID and transports of the created credential.
-
getAaguid
public ByteArray getAaguid()
Theaaguidreported in the of the created credential.This MAY be an AAGUID consisting of only zeroes.
-
getPublicKeyCose
public ByteArray getPublicKeyCose()
The public key of the created credential.This is used in
RelyingParty.finishAssertion(FinishAssertionOptions)to verify the authentication signatures.- See Also:
RegisteredCredential.getPublicKeyCose()
-
getClientExtensionOutputs
public java.util.Optional<ClientRegistrationExtensionOutputs> 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<AuthenticatorRegistrationExtensionOutputs> 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.
-
isDiscoverable
public java.util.Optional<java.lang.Boolean> isDiscoverable()
Try to determine whether the created credential is a discoverable credential, using the output from thecredPropsextension.- Returns:
- A present
trueif the created credential is discoverable. A presentfalseif the created credential is not discoverable. An empty value if it is not known whether the created credential is discoverable. - See Also:
- §10.4. Credential Properties Extension (credProps), "rk" output, Discoverable Credential
-
getAttestationTrustPath
public java.util.Optional<java.util.List<java.security.cert.X509Certificate>> getAttestationTrustPath()
The attestation trust path for the created credential, if any.If present, this may be useful for looking up attestation metadata from external sources. The attestation trust path has been successfully verified as trusted if and only if
isAttestationTrusted()istrue.You can ignore this if authenticator attestation is not relevant to your application.
- See Also:
- Attestation trust path
-
isAttestationTrusted
public boolean isAttestationTrusted()
trueif and only if the attestation signature was successfully linked to a trusted attestation root.This will always be
falseunless theattestationTrustSourcesetting was configured on theRelyingPartyinstance.You can ignore this if authenticator attestation is not relevant to your application.
-
getAttestationType
@NonNull public @NonNull AttestationType getAttestationType()
The attestation type that was used for the created credential.You can ignore this if authenticator attestation is not relevant to your application.
- See Also:
- §6.4.3. Attestation Types
-
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
-
-