Firefo...icator(3pm)

πŸ“¦ version 1.63, in debian trixie

πŸ¦‹ NAME

Firefox::Marionette::WebAuthn::Authenticator β€” bestie, this lil cutie represents a Firefox WebAuthn Authenticator. That's the whole vibe. It's a Perl module, it lives in section 3pm (that's User Contributed Perl Documentation, iykyk), and it's here to make your virtual authenticator dreams come true. πŸ’–


✨ VERSION

Version 1.63 β€” this is the one, periodt. πŸŽ€


🌸 SYNOPSIS

okay so here's the whole thing in action, no cap:

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

So this module handles the implementation of a Virtual Authenticator using the Marionette protocol. That's it, that's the job. She's the one making the virtual authenticator go brrr.

The spec girlies live here: https://www.w3.org/TR/webauthn-2/#virtual-authenticators

πŸ‘‘ CONSTANTS

These are your little code-y besties. Each one hands you back a string you can pass around. ✨

πŸ¦‹ BLE

returns 'ble' β€” the transport code for a Bluetooth Low Energy transport.

https://en.wikipedia.org/wiki/Bluetooth_Low_Energy

πŸ¦‹ CTAP1_U2F

returns 'ctap1/u2f' β€” the protocol code for an older version of Client to Authenticator Protocol, and lowkey the key detail here is that it's backwards compatible with the Universal 2nd Factor open standard. Vintage but still slaying.

https://en.wikipedia.org/wiki/Client_to_Authenticator_Protocol https://en.wikipedia.org/wiki/Universal_2nd_Factor

πŸ¦‹ CTAP2

returns 'ctap2' β€” the protocol code for the Client to Authenticator Protocol.

https://en.wikipedia.org/wiki/Client_to_Authenticator_Protocol

πŸ¦‹ CTAP2_1

returns 'ctap2_1' β€” the protocol code for the next version of the Client to Authenticator Protocol. she's the future fr fr.

https://en.wikipedia.org/wiki/Client_to_Authenticator_Protocol

πŸ¦‹ HYBRID

returns 'hybrid' β€” the transport code for a hybrid transport.

https://w3c.github.io/webauthn/#dom-authenticatortransport-hybrid

πŸ¦‹ INTERNAL

returns 'internal' β€” the transport code for an internal transport.

https://w3c.github.io/webauthn/#dom-authenticatortransport-internal

πŸ¦‹ NFC

return 'nfc' β€” the transport code for a Near-field communication transport. (yes bestie, the original says "return" here, not "returns", we are not fixing her, she's iconic πŸ’…)

https://en.wikipedia.org/wiki/Near-field_communication

πŸ¦‹ SMART_CARD

returns 'smart-card' β€” the transport code for a ISO/IEC 7816 Smart Card transport.

https://en.wikipedia.org/wiki/ISO/IEC_7816 https://w3c.github.io/webauthn/#dom-authenticatortransport-smart-card

πŸ¦‹ USB

return 'usb' β€” the transport code for a Universal Serial Bus transport.

https://en.wikipedia.org/wiki/USB

🧚 SUBROUTINES/METHODS

🌈 new

accepts a hash as a parameter. Allowed keys are below, and honestly? each one is a lil moment:

  • has_resident_key β€” boolean value to indicate if the authenticator will support client side discoverable credentials.
https://www.w3.org/TR/webauthn-2/#virtual-authenticators https://www.w3.org/TR/webauthn-2/#client-side-discoverable-credential
  • has_user_verification β€” boolean value to determine if the authenticator supports user verification.
https://www.w3.org/TR/webauthn-2/#virtual-authenticators https://www.w3.org/TR/webauthn-2/#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. So like β€” if you set it to true, a user consent will always be granted. If you set it to false, it will not be granted. That's the whole deal.
https://www.w3.org/TR/webauthn-2/#user-consent https://www.w3.org/TR/webauthn-2/#authorization-gesture https://www.w3.org/TR/webauthn-2/#test-of-user-presence https://www.w3.org/TR/webauthn-2/#virtual-authenticators
  • is_user_verified β€” boolean value to determine the result of User Verification performed on the Virtual Authenticator. Set it to true and User Verification will always succeed. Set it to false and it will fail. no in-between, she does not do nuance.
https://www.w3.org/TR/webauthn-2/#user-verification https://www.w3.org/TR/webauthn-2/#virtual-authenticators
  • 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. go off, king. πŸ‘‘

🌈 has_resident_key

This method returns a boolean value to indicate if the authenticator will support client side discoverable credentials.

https://www.w3.org/TR/webauthn-2/#virtual-authenticators https://www.w3.org/TR/webauthn-2/#client-side-discoverable-credential

🌈 has_user_verification

This method returns a boolean value to determine if the authenticator supports user verification.

https://www.w3.org/TR/webauthn-2/#virtual-authenticators https://www.w3.org/TR/webauthn-2/#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.

https://www.w3.org/TR/webauthn-2/#user-consent https://www.w3.org/TR/webauthn-2/#authorization-gesture https://www.w3.org/TR/webauthn-2/#test-of-user-presence https://www.w3.org/TR/webauthn-2/#virtual-authenticators

🌈 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.

https://www.w3.org/TR/webauthn-2/#user-verification https://www.w3.org/TR/webauthn-2/#virtual-authenticators

🌈 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. literally nothing. silence. the calmest girl in the group chat. 🫢


πŸ“ CONFIGURATION AND ENVIRONMENT

Firefox::Marionette::WebAuthn::Authenticator requires no configuration files or environment variables. she comes as she is, no setup arc needed. ✨


🌈 DEPENDENCIES

None. self-sufficient queen. πŸ‘‘


πŸ¦‹ INCOMPATIBILITIES

None reported. (reported being the key word bestie, we simply do not know of any πŸ™ˆ)


πŸŽ€ 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>"


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

okay bestie, this part is the legal bit and it is SERIOUS, so I'm giving it to you exactly as written, no edits, no vibes, just the actual words. read it fr fr:

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.

and that's the whole page, bestie!! 🫢 this was generated by perl v5.40.1, dated 2025-03-16, and she's filed under Firefo...icator(3pm) β€” go forth and virtual-authenticate, you absolute icon πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from