NAME
Firefox::Marionette::WebAuthn::Authenticator - Represents a Firefox WebAuthn Authenticator
VERSION
Version 1.60
SYNOPSIS
use Firefox::Marionette();
use Crypt::URandom();
my $user_name = MIME::Base64::encode_base64( Crypt::URandom::urandom( 10 ), q[] ) . q[@example.com];
my $firefox = Firefox::Marionette->new();
my $authenticator = $firefox->add_webauthn_authenticator( transport => Firefox::Marionette::WebAuthn::Authenticator::INTERNAL(), protocol => Firefox::Marionette::WebAuthn::Authenticator::CTAP2() );
$firefox->go('https://webauthn.io');
$firefox->find_id('input-email')->type($user_name);
$firefox->find_id('register-button')->click();
$firefox->await(sub { sleep 1; $firefox->find_class('alert-success'); });
$firefox->find_id('login-button')->click();
$firefox->await(sub { sleep 1; $firefox->find_class('hero confetti'); });
DESCRIPTION
This module handles the implementation of a Virtual Authenticator using the Marionette protocol.
CONSTANTS
BLE
return 'ble', the transport code for a Bluetooth Low Energy transport.
CTAP1_U2F
returns 'ctap1/u2f', the protocol code for an older version of Client to Authenticator Protocol, that is backwards compatible with the Universal 2nd Factor open standard.
CTAP2
returns 'ctap2', the protocol code for the Client to Authenticator Protocol.
CTAP2_1
returns 'ctap2_1', the protocol code for the next version of the Client to Authenticator Protocol.
HYBRID
returns 'hybrid', the transport code for a hybrid transport.
INTERNAL
returns 'internal', the transport code for an internal transport.
NFC
return 'nfc', the transport code for a Near-field communication transport.
SMART_CARD
returns 'smart-card', the transport code for a ISO/IEC 7816 Smart Card transport.
USB
return 'usb', the transport code for a Universal Serial Bus transport.
SUBROUTINES/METHODS
new
accepts a hash as a parameter. Allowed keys are below;
has_resident_key - boolean value to indicate if the authenticator will support client side discoverable credentials
has_user_verification - boolean value to determine if the authenticator supports user verification.
id - the id of the authenticator.
is_user_consenting - boolean value to determine the result of all user consent authorization gestures, and by extension, any test of user presence performed on the Virtual Authenticator. If set to true, a user consent will always be granted. If set to false, it will not be granted.
is_user_verified - boolean value to determine the result of User Verification performed on the Virtual Authenticator. If set to true, User Verification will always succeed. If set to false, it will fail.
protocol - the protocol spoken by the authenticator. This may be CTAP1_U2F, CTAP2 or CTAP2_1.
transport - the transport simulated by the authenticator. This may be BLE, HYBRID, INTERNAL, NFC, SMART_CARD or USB.
This method returns a new webauthn virtual authenticator object.
has_resident_key
This method returns a boolean value to indicate if the authenticator will support client side discoverable credentials.
has_user_verification
This method returns a boolean value to determine if the authenticator supports user verification.
is_user_consenting
This method returns a boolean value to determine the result of all user consent authorization gestures, and by extension, any test of user presence performed on the Virtual Authenticator. If set to true, a user consent will always be granted. If set to false, it will not be granted.
is_user_verified
This method returns a boolean value to determine the result of User Verification performed on the Virtual Authenticator. If set to true, User Verification will always succeed. If set to false, it will fail.
protocol
This method returns a string containing the protocol spoken by the authenticator. This may be CTAP1_U2F, CTAP2 or CTAP2_1.
transport
This method returns a string containing the transport simulated by the authenticator. This may be BLE, HYBRID, INTERNAL, NFC, SMART_CARD or USB.
DIAGNOSTICS
None.
CONFIGURATION AND ENVIRONMENT
Firefox::Marionette::WebAuthn::Authenticator requires no configuration files or environment variables.
DEPENDENCIES
None.
INCOMPATIBILITIES
None reported.
BUGS AND LIMITATIONS
To report a bug, or view the current list of bugs, please visit https://github.com/david-dick/firefox-marionette/issues
AUTHOR
David Dick <ddick@cpan.org>
LICENSE AND COPYRIGHT
Copyright (c) 2024, David Dick <ddick@cpan.org>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See "perlartistic" in perlartistic.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.