Replace subject-based folder hierarchy with a document-type-based layout. Filesystem now establishes broad ownership and locality: - knowledge/ → concepts/ | technologies/ | methods/ - homelab/ → projects/homelab/plans/ | projects/homelab/guides/ - journal/ → records/journal/ - projects/ flat files → per-project sub-folders with overview.md - knowledge/parking-lot.md → inbox/ Deleted files: - Root-level Backend Residency operational files (AGENTS.md, CURRENT.md, ROADMAP.md, SKILLS.md, todo.md, todo.txt) — belong in backend-residency repo - docs/ directory entirely (ADRs belong in bitetrack-api, remaining files unused) - learning/ directory (backend-residency.md deleted; cicd guide moved to knowledge/methods/) - projects/README.md (replaced by individual project overview files)
950 B
950 B
Authentication & Authorization Notes
JWT (JSON Web Tokens)
- A compact, URL-safe means of representing claims to be transferred between two parties.
- Consists of three parts separated by dots:
Header.Payload.Signature - Header: Algorithm & token type (e.g. HS256, JWT).
- Payload: Claims (e.g. user ID, expiration, roles).
- Signature: Verifies that the sender of the JWT is who it says it is and ensures the message wasn't changed along the way.
Session/JWT flow
- Client logs in with credentials.
- Server verifies and issues an Access Token (short-lived, e.g. 15m) and a Refresh Token (long-lived, e.g. 7 days).
- Client stores Refresh Token in a secure,
HttpOnlycookie and Access Token in memory or storage. - Client includes Access Token in the Authorization header (
Bearer <token>) for protected requests. - When Access Token expires, client calls
/refreshwith the Refresh Token to get a new Access Token.