Files
server/api/src/controllers
YuryShkoda 398dfb515c docs(api): document the current authentication flow, comment non-obvious auth code
Add a new diagram covering the authentication mechanism: a
session-based /SASLogon/login + /SASLogon/authorize handshake that
mints a short-lived auth code, exchanged at /SASjsApi/auth/token for a
revocable JWT pair, with optional LDAP-backed credential verification.

Add WHY comments (not present before) at the handful of spots in the
auth code whose behaviour isn't obvious from reading them in isolation:
why /auth/token can return an existing token pair instead of rotating
it, why the auth-code exchange never checks a client's clientSecret,
how verifyTokenInDB turns self-verifying JWTs into revocable ones, why
two /SASjsApi/user routes stay reachable in desktop mode, why the
static authorized-route list exists on top of plain authentication,
and why /SASjsApi/client's real protection lives at its router mount
point in routes/api/index.ts rather than in client.ts itself.
2026-07-15 16:34:33 +03:00
..
2022-07-26 14:16:27 +05:00
2022-10-03 21:24:10 +05:00
2022-09-29 18:41:28 +05:00
2022-08-01 21:33:10 +05:00
2022-08-01 21:33:10 +05:00
2024-10-29 11:40:44 +03:00
2025-09-25 13:40:10 +02:00