Package com.yubico.yubikit.fido.ctap
Class FingerprintBioEnrollment
java.lang.Object
com.yubico.yubikit.fido.ctap.BioEnrollment
com.yubico.yubikit.fido.ctap.FingerprintBioEnrollment
Implements Fingerprint Bio Enrollment commands.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
Convenience class for handling one fingerprint enrollmentstatic class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
protected static final int
protected static final int
Fields inherited from class com.yubico.yubikit.fido.ctap.BioEnrollment
ctap, modality, MODALITY_FINGERPRINT, RESULT_MODALITY
-
Constructor Summary
ConstructorsConstructorDescriptionFingerprintBioEnrollment
(Ctap2Session ctap, PinUvAuthProtocol pinUvAuthProtocol, byte[] pinUvToken) -
Method Summary
Modifier and TypeMethodDescriptionConvenience wrapper for doing fingerprint enrollment.enrollBegin
(Integer timeout, com.yubico.yubikit.core.application.CommandState state) Start fingerprint enrollment.void
Cancel any ongoing fingerprint enrollment.enrollCaptureNext
(byte[] templateId, Integer timeout, com.yubico.yubikit.core.application.CommandState state) Continue fingerprint enrollment.Get a dict of enrolled fingerprint templates which maps template ID's to their friendly names.Get fingerprint sensor info.void
removeEnrollment
(byte[] templateId) Remove a previously enrolled fingerprint template.void
Set/Change the friendly name of a previously enrolled fingerprint template.Methods inherited from class com.yubico.yubikit.fido.ctap.BioEnrollment
getModality, isSupported
-
Field Details
-
TEMPLATE_INFO_ID
protected static final int TEMPLATE_INFO_ID- See Also:
-
TEMPLATE_INFO_FRIENDLY_NAME
protected static final int TEMPLATE_INFO_FRIENDLY_NAME- See Also:
-
FEEDBACK_FP_GOOD
public static final int FEEDBACK_FP_GOOD- See Also:
-
FEEDBACK_FP_TOO_HIGH
public static final int FEEDBACK_FP_TOO_HIGH- See Also:
-
FEEDBACK_FP_TOO_LOW
public static final int FEEDBACK_FP_TOO_LOW- See Also:
-
FEEDBACK_FP_TOO_LEFT
public static final int FEEDBACK_FP_TOO_LEFT- See Also:
-
FEEDBACK_FP_TOO_RIGHT
public static final int FEEDBACK_FP_TOO_RIGHT- See Also:
-
FEEDBACK_FP_TOO_FAST
public static final int FEEDBACK_FP_TOO_FAST- See Also:
-
FEEDBACK_FP_TOO_SLOW
public static final int FEEDBACK_FP_TOO_SLOW- See Also:
-
FEEDBACK_FP_POOR_QUALITY
public static final int FEEDBACK_FP_POOR_QUALITY- See Also:
-
FEEDBACK_FP_TOO_SKEWED
public static final int FEEDBACK_FP_TOO_SKEWED- See Also:
-
FEEDBACK_FP_TOO_SHORT
public static final int FEEDBACK_FP_TOO_SHORT- See Also:
-
FEEDBACK_FP_MERGE_FAILURE
public static final int FEEDBACK_FP_MERGE_FAILURE- See Also:
-
FEEDBACK_FP_EXISTS
public static final int FEEDBACK_FP_EXISTS- See Also:
-
FEEDBACK_NO_USER_ACTIVITY
public static final int FEEDBACK_NO_USER_ACTIVITY- See Also:
-
FEEDBACK_NO_UP_TRANSITION
public static final int FEEDBACK_NO_UP_TRANSITION- See Also:
-
-
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.CommandExceptionGet 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 toenrollBegin(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
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
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.CommandExceptionGet 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:
-