Integrating External Digital Membership Card API with OctoPrint Plugin

Hi all,

I’m exploring an integration idea where OctoPrint would validate users through an external digital membership card system before allowing printer access in a shared lab environment.

The concept is:

User scans a QR/NFC-based digital membership card
OctoPrint plugin sends API request to external server
Server validates membership status
Printer controls (start/stop/access) are enabled based on response

I’d like to understand:

What would be the best way to securely handle external API authentication in an OctoPrint plugin?
How should token/session validation be managed if the printer runs offline?
Are there existing plugins that demonstrate similar external authentication workflows?

Probably something integrating acl_keyvalidator_hook and maybe user_manager_factory_hook. The closest thing I've seen to this type of plugin that interacts with the login is GitHub - gillg/OctoPrint-LDAP: Octoprint LDAP auth plugin, GitHub - JoveToo/OctoPrint-MFA: Multi Factor Authentication for OctoPrint, and GitHub - OctoPrint/OctoPrint-MfaTotp: Plugin to support TOTP based Two Factor Authentication in OctoPrint >= 1.11.0.