|
NAMEFirefox::Marionette::WebAuthn::Authenticator - Represents a Firefox WebAuthn Authenticator VERSIONVersion 1.64 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'); });
DESCRIPTIONThis module handles the implementation of a Virtual Authenticator <https://www.w3.org/TR/webauthn-2/#virtual-authenticators> using the Marionette protocol. CONSTANTSBLEreturn 'ble', the transport code for a Bluetooth Low Energy <https://en.wikipedia.org/wiki/Bluetooth_Low_Energy> transport. CTAP1_U2Freturns 'ctap1/u2f', the protocol code for an older version of Client to Authenticator Protocol <https://en.wikipedia.org/wiki/Client_to_Authenticator_Protocol>, that is backwards compatible with the Universal 2nd Factor <https://en.wikipedia.org/wiki/Universal_2nd_Factor> open standard. CTAP2returns 'ctap2', the protocol code for the Client to Authenticator Protocol <https://en.wikipedia.org/wiki/Client_to_Authenticator_Protocol>. CTAP2_1returns 'ctap2_1', the protocol code for the next version of the Client to Authenticator Protocol <https://en.wikipedia.org/wiki/Client_to_Authenticator_Protocol>. HYBRIDreturns 'hybrid', the transport code for a hybrid <https://w3c.github.io/webauthn/#dom-authenticatortransport-hybrid> transport. INTERNALreturns 'internal', the transport code for an internal <https://w3c.github.io/webauthn/#dom-authenticatortransport-internal> transport. NFCreturn 'nfc', the transport code for a Near-field communication <https://en.wikipedia.org/wiki/Near-field_communication> transport. SMART_CARDreturns 'smart-card', the transport code for a ISO/IEC 7816 <https://en.wikipedia.org/wiki/ISO/IEC_7816> Smart Card <https://w3c.github.io/webauthn/#dom-authenticatortransport-smart-card> transport. USBreturn 'usb', the transport code for a Universal Serial Bus <https://en.wikipedia.org/wiki/USB> transport. SUBROUTINES/METHODSnewaccepts a hash as a parameter. Allowed keys are below;
This method returns a new webauthn virtual authenticator object. has_resident_keyThis method returns a boolean value to indicate if the authenticator <https://www.w3.org/TR/webauthn-2/#virtual-authenticators> will support client side discoverable credentials <https://www.w3.org/TR/webauthn-2/#client-side-discoverable-credential>. has_user_verificationThis method returns a boolean value to determine if the authenticator <https://www.w3.org/TR/webauthn-2/#virtual-authenticators> supports user verification <https://www.w3.org/TR/webauthn-2/#user-verification>. is_user_consentingThis method returns a boolean value to determine the result of all user consent <https://www.w3.org/TR/webauthn-2/#user-consent> authorization gestures <https://www.w3.org/TR/webauthn-2/#authorization-gesture>, and by extension, any test of user presence <https://www.w3.org/TR/webauthn-2/#test-of-user-presence> performed on the Virtual Authenticator <https://www.w3.org/TR/webauthn-2/#virtual-authenticators>. If set to true, a user consent <https://www.w3.org/TR/webauthn-2/#user-consent> will always be granted. If set to false, it will not be granted. is_user_verifiedThis method returns a boolean value to determine the result of User Verification <https://www.w3.org/TR/webauthn-2/#user-verification> performed on the Virtual Authenticator <https://www.w3.org/TR/webauthn-2/#virtual-authenticators>. If set to true, User Verification <https://www.w3.org/TR/webauthn-2/#user-verification> will always succeed. If set to false, it will fail. protocolThis method returns a string containing the protocol spoken by the authenticator. This may be CTAP1_U2F, CTAP2 or CTAP2_1. transportThis method returns a string containing the transport simulated by the authenticator. This may be BLE, HYBRID, INTERNAL, NFC, SMART_CARD or USB. DIAGNOSTICSNone. CONFIGURATION AND ENVIRONMENTFirefox::Marionette::WebAuthn::Authenticator requires no configuration files or environment variables. DEPENDENCIESNone. INCOMPATIBILITIESNone reported. BUGS AND LIMITATIONSTo report a bug, or view the current list of bugs, please visit <https://github.com/david-dick/firefox-marionette/issues> AUTHORDavid Dick "<ddick@cpan.org>" LICENSE AND COPYRIGHTCopyright (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 WARRANTYBECAUSE 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.
|