NAME

Crypt::MultiKey::FIDO2 - Access to libfido2, if it was available when Crypt::MultiKey was installed

SYNOPSIS

@devices= Crypt::MultiKey::FIDO2::list_devices();
if (@devices > 1) {
  say "Please touch desired authenticator";
  $dev= Crypt::MultiKey::FIDO2::select_device($timeout, \@devices);
}

DESCRIPTION

FIDO2 support is optional. You can test whether it was enabled for this build of Crypt::MultiKey by checking Crypt::MultiKey::FIDO2->can("list_devices").

FUNCTIONS

available

Whether libfido2 support was enabled during the installation of Crypt::MultiKey.

list_devices

Return a list of Crypt::MultiKey::FIDO2::Device objects for each connected authenticator which can be opened.

select_device

# select from list_devices() output.  If only one exists, returns immediately.
$dev= Crypt::MultiKey::FIDO2::select_device($timeout);

# select from custom list of devices.
$dev= Crypt::MultiKey::FIDO2::select_device($timeout, \@devices);

If there are multiple authenticators connected to the host, this lets the user select which one they want to use by touching it. This starts a touch request on all devices, and then the first that receives a touch request is returned. If none are touched, it returns undef.

If there is only one to choose from, it is returned immediately without waiting for a touch.

VERSION

version 0.000_001

AUTHOR

Michael Conrad <mike@nrdvana.net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Michael Conrad.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.