Firefox::Marionette::WebAuthn::Authenticator - Represents a Firefox WebAuthn Authenticator
Version 1.55
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'); });
This module handles the implementation of a Virtual Authenticator using the Marionette protocol.
return 'ble', the transport code for a Bluetooth Low Energy transport.
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.
returns 'ctap2', the protocol code for the Client to Authenticator Protocol.
returns 'ctap2_1', the protocol code for the next version of the Client to Authenticator Protocol.
returns 'hybrid', the transport code for a hybrid transport.
returns 'internal', the transport code for an internal transport.
return 'nfc', the transport code for a Near-field communication transport.
returns 'smart-card', the transport code for a ISO/IEC 7816 Smart Card transport.
return 'usb', the transport code for a Universal Serial Bus transport.
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.
This method returns a boolean value to indicate if the authenticator will support client side discoverable credentials.
This method returns a boolean value to determine if the authenticator supports user verification.
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.
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.
This method returns a string containing the protocol spoken by the authenticator. This may be CTAP1_U2F, CTAP2 or CTAP2_1.
This method returns a string containing the transport simulated by the authenticator. This may be BLE, HYBRID, INTERNAL, NFC, SMART_CARD or USB.
None.
Firefox::Marionette::WebAuthn::Authenticator requires no configuration files or environment variables.
None reported.
To report a bug, or view the current list of bugs, please visit https://github.com/david-dick/firefox-marionette/issues
David Dick <ddick@cpan.org>
<ddick@cpan.org>
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.
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.
To install Firefox::Marionette, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Firefox::Marionette
CPAN shell
perl -MCPAN -e shell install Firefox::Marionette
For more information on module installation, please visit the detailed CPAN module installation guide.