SECURITY FEATURE
Session Auth
Google is the only login path; once signed in, the demo can switch roles to show how permissions change.
Feature Guide
A quick orientation block that answers the essential questions: what this feature does, how it works, why it matters, and the key concepts behind it.
What this does
Google signs the user in, then the session stores the selected demo role and re-hydrates it on every request.
Session State
Google sign-in required
Sign in with Google first. The role selector is only available after authentication.
Authorization is required to access role switching in this demo.
Verified against Semitexa Ultimate 2026.09.19.1020
Session Auth
Authenticate once per session — the framework stores identity and re-hydrates it on every request.
How it works
Google OAuth is the single login path. After the callback completes, the authenticated identity is written into a typed Session Payload. On every subsequent request the auth handler reads that payload back out and reconstructs the principal, so handlers never touch raw session keys.
Why this matters
Session auth in long-running PHP workers is fragile when state leaks across requests. Semitexa isolates session read/write into the execution-scoped tier so each request gets a clean view, and the typed segment guarantees the shape is always valid.