intermediateSpring Security340 of 469
Stateless vs stateful authentication.
Tests whether you know stateful auth (session IDs) requires the server to store session state (or share it via sticky sessions/a session store), while stateless auth (JWT) embeds all identity info in the token itself, letting any instance validate it without shared server-side state -- the key enabler for horizontal scaling.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response