Class FingerprintBioEnrollment

java.lang.Object
com.yubico.yubikit.fido.ctap.BioEnrollment
com.yubico.yubikit.fido.ctap.FingerprintBioEnrollment

public class FingerprintBioEnrollment extends BioEnrollment
Implements Fingerprint Bio Enrollment commands.
See Also:
  • Field Details

  • Constructor Details

    • FingerprintBioEnrollment

      public FingerprintBioEnrollment(Ctap2Session ctap, PinUvAuthProtocol pinUvAuthProtocol, byte[] pinUvToken) throws IOException, com.yubico.yubikit.core.application.CommandException
      Throws:
      IOException
      com.yubico.yubikit.core.application.CommandException
  • Method Details

    • getSensorInfo

      public FingerprintBioEnrollment.SensorInfo getSensorInfo() throws IOException, com.yubico.yubikit.core.application.CommandException
      Get fingerprint sensor info.
      Returns:
      A dict containing FINGERPRINT_KIND, MAX_SAMPLES_REQUIRES and MAX_TEMPLATE_FRIENDLY_NAME.
      Throws:
      IOException - A communication error in the transport layer.
      com.yubico.yubikit.core.application.CommandException - A communication error in the protocol layer.
      See Also:
    • enrollBegin

      public FingerprintBioEnrollment.EnrollBeginStatus enrollBegin(@Nullable Integer timeout, @Nullable com.yubico.yubikit.core.application.CommandState state) throws IOException, com.yubico.yubikit.core.application.CommandException
      Start fingerprint enrollment.

      Starts the process of enrolling a new fingerprint, and will wait for the user to scan their fingerprint once to provide an initial sample.

      Parameters:
      timeout - Optional timeout in milliseconds.
      state - If needed, the state to provide control over the ongoing operation.
      Returns:
      A status object containing the new template ID, the sample status, and the number of samples remaining to complete the enrollment.
      Throws:
      IOException - A communication error in the transport layer.
      com.yubico.yubikit.core.application.CommandException - A communication error in the protocol layer.
      See Also:
    • enrollCaptureNext

      public FingerprintBioEnrollment.CaptureStatus enrollCaptureNext(byte[] templateId, @Nullable Integer timeout, @Nullable com.yubico.yubikit.core.application.CommandState state) throws IOException, com.yubico.yubikit.core.application.CommandException
      Continue fingerprint enrollment.

      Continues enrolling a new fingerprint and will wait for the user to scan their fingerprint once to provide a new sample. Once the number of samples remaining is 0, the enrollment is completed.

      Parameters:
      templateId - The template ID returned by a call to enrollBegin(Integer timeout, CommandState state).
      timeout - Optional timeout in milliseconds.
      state - If needed, the state to provide control over the ongoing operation.
      Returns:
      A status object containing the sample status, and the number of samples remaining to complete the enrollment.
      Throws:
      IOException - A communication error in the transport layer.
      com.yubico.yubikit.core.application.CommandException - A communication error in the protocol layer.
      See Also:
    • enrollCancel

      public void enrollCancel() throws IOException, com.yubico.yubikit.core.application.CommandException
      Cancel any ongoing fingerprint enrollment.
      Throws:
      IOException - A communication error in the transport layer.
      com.yubico.yubikit.core.application.CommandException - A communication error in the protocol layer.
      See Also:
    • enroll

      public FingerprintBioEnrollment.Context enroll(@Nullable Integer timeout)
      Convenience wrapper for doing fingerprint enrollment.
      Parameters:
      timeout - Optional timeout in milliseconds.
      Returns:
      An initialized FingerprintEnrollment.Context.
      See Also:
    • enumerateEnrollments

      public Map<byte[],String> enumerateEnrollments() throws IOException, com.yubico.yubikit.core.application.CommandException
      Get a dict of enrolled fingerprint templates which maps template ID's to their friendly names.
      Returns:
      A Map of enrolled templateId -> name pairs.
      Throws:
      IOException - A communication error in the transport layer.
      com.yubico.yubikit.core.application.CommandException - A communication error in the protocol layer.
      See Also:
    • setName

      public void setName(byte[] templateId, String name) throws IOException, com.yubico.yubikit.core.application.CommandException
      Set/Change the friendly name of a previously enrolled fingerprint template.
      Parameters:
      templateId - The ID of the template to change.
      name - A friendly name to give the template.
      Throws:
      IOException - A communication error in the transport layer.
      com.yubico.yubikit.core.application.CommandException - A communication error in the protocol layer.
      See Also:
    • removeEnrollment

      public void removeEnrollment(byte[] templateId) throws IOException, com.yubico.yubikit.core.application.CommandException
      Remove a previously enrolled fingerprint template.
      Parameters:
      templateId - The Id of the template to remove.
      Throws:
      IOException - A communication error in the transport layer.
      com.yubico.yubikit.core.application.CommandException - A communication error in the protocol layer.
      See Also: