Module auth

Module auth 

Source
Expand description

Module for /home, /login, /logout and /error entrypoints.

Structs§

DetailError
Struct for representing detailed errors in JSON format.
RedirectResponse 🔒
Struct for representing a JSON Response with a redirect URL.
error
Handles the error endpoint, rendering the appropriate HTML page based on session issues.
home
Handles the home endpoint, rendering the listing page for authenticated users.
login
Handles the login endpoint, verifying credentials and creating session tokens.
logout
Handles the logout endpoint, logging out the user and rendering the appropriate HTML page.

Functions§

failed_auth
Constructs an HttpResponse for failed session_token verification.