Class FIDO2Registration


  • public class FIDO2Registration
    extends java.lang.Object
    A FIDO registration.
    • Constructor Summary

      Constructors 
      Constructor Description
      FIDO2Registration​(FIDORegistrationDefinition reg)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAAGUID()
      return the AAGUID of the registration
      byte[][] getAttestationTrustPath()
      Get the trust path used to perform attestation.
      java.lang.String getAttestationType()
      Get the type of attestation performed during registration
      java.util.Map<java.lang.String,​java.lang.String> getAttributes()
      Get the extra attributes of the registration associated when the registration was established
      boolean getBackupEligibility()
      Get the value of the backup eligibility bit during registration.
      boolean getBackupState()
      Get the value of the backup state bit during registration.
      long getCounter()
      Get the internal authenticator counter.
      long getCreatedDate()
      Get the time the registration was registered in milliseconds since epoch
      java.lang.String getCredentialId()
      Get the credential ID as returned by the authenticator.
      java.lang.String getCredentialPublicKey()
      get the credential public key of the registration.
      java.lang.String getFormat()
      Get the attestation format provided during registration
      java.lang.String getFriendlyName()
      Get the friendly name, or nickname, of the registration.
      long getLastUsed()
      Get the last time this registration was used to perform a successful authentication in milliseconds since epoch
      java.lang.String getMetadataDescription()
      Get the authenticator description from metadata
      java.lang.String getMetadataIcon()
      Get the icon attribute from the metadata.
      java.lang.String getRpId()
      Get the relying party ID that this registration was registered to.
      java.util.List<java.lang.String> getTransports()
      Get the transports of this authenticator if provided
      java.lang.String getUserId()
      Get the opaque user ID for this registration.
      java.lang.String getUsername()
      Get the Verify Access username for this registration.
      int getVersion()
      Get the version of the registration
      boolean isEnabled()
      Is this registration enabled
      java.lang.String toString()
      Get the registration as a JSON payload.
      boolean wasUserPresent()
      Get the value of the user-present bit during registration
      boolean wasUserVerified()
      Get the value of the user-verified bit during registration
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FIDO2Registration

        public FIDO2Registration​(FIDORegistrationDefinition reg)
    • Method Detail

      • getCredentialId

        public java.lang.String getCredentialId()
        Get the credential ID as returned by the authenticator.
        Returns:
        a base64URL encoded string of the credential ID
      • getUserId

        public java.lang.String getUserId()
        Get the opaque user ID for this registration.
        Returns:
        a UUID representing the user
      • getUsername

        public java.lang.String getUsername()
        Get the Verify Access username for this registration.
        Returns:
        the username
      • getRpId

        public java.lang.String getRpId()
        Get the relying party ID that this registration was registered to.
        Returns:
        the RP ID as a String
      • getFriendlyName

        public java.lang.String getFriendlyName()
        Get the friendly name, or nickname, of the registration.
        Returns:
        the friendly name/nickname set during registration
      • getAAGUID

        public java.lang.String getAAGUID()
        return the AAGUID of the registration
        Returns:
        the AAGUID as a UUID / null if no AAGUID is present
      • getCredentialPublicKey

        public java.lang.String getCredentialPublicKey()
        get the credential public key of the registration.
        Returns:
        the public key as a base64URL encoded string
      • getFormat

        public java.lang.String getFormat()
        Get the attestation format provided during registration
        Returns:
        the format
      • wasUserPresent

        public boolean wasUserPresent()
        Get the value of the user-present bit during registration
        Returns:
        true: user present was set / false: user present was not set.
      • wasUserVerified

        public boolean wasUserVerified()
        Get the value of the user-verified bit during registration
        Returns:
        true: user verified was set / false: user verified was not set.
      • isEnabled

        public boolean isEnabled()
        Is this registration enabled
      • getCounter

        public long getCounter()
        Get the internal authenticator counter. The counter is a basic mitigation against authenticator cloning attacks.
        Returns:
        the authenticator counter as a number
      • getVersion

        public int getVersion()
        Get the version of the registration
        Returns:
        1: This was a migrated u2f registration / 2: this was a webauthn registration
      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getAttributes()
        Get the extra attributes of the registration associated when the registration was established
      • getLastUsed

        public long getLastUsed()
        Get the last time this registration was used to perform a successful authentication in milliseconds since epoch
      • getCreatedDate

        public long getCreatedDate()
        Get the time the registration was registered in milliseconds since epoch
      • getAttestationType

        public java.lang.String getAttestationType()
        Get the type of attestation performed during registration
      • getAttestationTrustPath

        public byte[][] getAttestationTrustPath()
        Get the trust path used to perform attestation. May be an empty array in instances where attestation was not performed.
      • toString

        public java.lang.String toString()
        Get the registration as a JSON payload. Can then be parsed by JSON.parse to get a native object
        Overrides:
        toString in class java.lang.Object
      • getMetadataIcon

        public java.lang.String getMetadataIcon()
        Get the icon attribute from the metadata. This may be a base64url encoded string suitable for usage in a image source attribute, or a URL
        Returns:
        null if no device metadata was present, or no icon was present in the metadata
      • getMetadataDescription

        public java.lang.String getMetadataDescription()
        Get the authenticator description from metadata
        Returns:
        null if no metadata was present for the authenticator
      • getTransports

        public java.util.List<java.lang.String> getTransports()
        Get the transports of this authenticator if provided
        Returns:
        the list of transports or null if no transports are present for the registration
      • getBackupEligibility

        public boolean getBackupEligibility()
        Get the value of the backup eligibility bit during registration. A value of true means the public key credential source can to be backed up. A value of false means the public key credential source cannot be backed up.
        Returns:
        boolean
      • getBackupState

        public boolean getBackupState()
        Get the value of the backup state bit during registration. A value of true means the public key credential source is currently backed up. A value of false means the public key credential source is not currently backed up.
        Returns:
        boolean