Skip to main content

Module auth

Module auth 

Source
Expand description

Authentication module for the What framework

Provides JWT-based authentication with:

  • Cookie-based JWT storage (HttpOnly, Secure, SameSite)
  • Configurable protected routes
  • Session integration for user data
  • Backend API integration for login/logout

Structsยง

AuthHandler
Authentication handler
JwtClaims
JWT claims structure Uses a flexible HashMap to support any claims from the backend
UserContext
User context for templates Contains authenticated user information extracted from JWT