How cellbis/mojo-hakkefuin works
Hakkefuin is a Mojolicious authentication plugin: an application registers it, requests use its helpers to sign in or validate sessions, and configured database backends persist authentication and lock state. The README also documents CSRF token handling, cookie/session expiry, token rotation, optional locking, and three database drivers. Relationships below are limited to those described in the README; source excerpts were not available, so internal call details are not inferred.
Main entry points: Plugin/Hakkefuin.pm Plugin setup · Mojo/Hakkefuin.pm Auth helpers · sqlite.pm SQLite backend · mariadb.pm MariaDB backend
Components 11
Mojolicious integration
- Plugin setup
lib/Mojolicious/Plugin/Hakkefuin.pm
Authentication and sessions
- Auth helpers
lib/Mojo/Hakkefuin.pm - Session manager
lib/Mojo/Hakkefuin/Sessions.pm - Utilities
lib/Mojo/Hakkefuin/Utils.pm
Database backends
- SQLite backend
lib/Mojo/Hakkefuin/Backend/sqlite.pm - MariaDB backend
lib/Mojo/Hakkefuin/Backend/mariadb.pm - PostgreSQL backend
lib/Mojo/Hakkefuin/Backend/pg.pm - Backend interface
lib/Mojo/Hakkefuin/Backend.pm
Other components
- Mojolicious app
- HTTP request
- Database
Connections 13
- Mojolicious app → Plugin setup: registers
README.md - Plugin setup → Auth helpers: registers helpers
README.md - Plugin setup → Session manager: attaches shared
README.md - Plugin setup → SQLite backend: selects by config
README.md - Plugin setup → MariaDB backend: selects by config
README.md - Plugin setup → PostgreSQL backend: selects by config
README.md - HTTP request → Auth helpers: uses helpers
README.md - Auth helpers → SQLite backend: checks or updates
README.md - Auth helpers → MariaDB backend: checks or updates
README.md - Auth helpers → PostgreSQL backend: checks or updates
README.md - SQLite backend → Database: reads and writes
README.md - MariaDB backend → Database: reads and writes
README.md - PostgreSQL backend → Database: reads and writes
README.md