Skip to content

Internals Identity

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

Identity internals

Framework Internals · Developer guide

AdminModel uses awt_admin, initializes from a session ID or explicit ID, exposes registration/setters/token/password changes and hides password/token in model output. AdminAuthentication hashes input with SHA-512 and queries matching username/password, populates session admin fields and stores the last client IP. It does not use password_hash/password_verify or a general role/auth provider abstraction.

Admin adds numeric permission comparison, token-based session authentication and logout. Lower permission values grant broader access. Some session key assumptions are unchecked; route authors must establish authentication before trusting authorization results.

SessionHandler is a helper, not PHP's internal SessionHandler implementation or SessionHandlerInterface. Its named SessionHandler() method sets cookie parameters from Settings and starts a session. It initializes a started timestamp, applies an optional expires field and regeneration metadata; the actual regeneration comparison uses 10 seconds in the implementation. It does not bind the client IP despite the source description. sessionClearing removes session/cookie state and destroys the session; sessionDumper prints debug session contents.

Cookie Secure/HttpOnly/SameSite are driven by string settings. AWT installation defaults Secure true, HttpOnly true and SameSite Strict. HTTP-only local applications must deliberately adapt Secure. CSRF token storage delegates session startup to this helper.

Component reference

Clone this wiki locally