fix: missing brace in users.js, ws double-increment, b64url stack overflow, docs storage
This commit is contained in:
@@ -62,12 +62,12 @@ The `lib/` modules auto-discover the project root at runtime via `Path(__file__)
|
||||
|
||||
## JWT Token Model
|
||||
|
||||
Vacuum Wall uses JWT-based authentication with access/refresh token rotation. Tokens are stored in browser `localStorage` and injected as `Authorization: Bearer <token>` headers. The API never reads cookies — authentication is header-only.
|
||||
Vacuum Wall uses JWT-based authentication with access/refresh token rotation. Tokens are stored in browser `sessionStorage` and injected as `Authorization: Bearer <token>` headers. The API never reads cookies — authentication is header-only.
|
||||
|
||||
| Token | Lifetime | Storage | Purpose |
|
||||
|---|---|---|---|
|
||||
| Access | 15 min | localStorage | API auth, permission checks |
|
||||
| Refresh | 7 days | localStorage | Token rotation, new access tokens |
|
||||
| Access | 15 min | sessionStorage / memory | API auth, permission checks |
|
||||
| Refresh | 7 days | sessionStorage | Token rotation, new access tokens |
|
||||
|
||||
JWT payload contains `sub` (username), `exp` (expiry), `iat` (issued at), `jti` (unique identifier), `type` (`"access"` or `"refresh"`), `permissions` (per-subsystem permissions), and `session_id` (session binding). Access tokens additionally contain `permissions` and `session_id`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user