intermediateSession Management: Timeout, Concurrency & Fixation

What does SessionCreationPolicy.STATELESS actually do, and when should you use it?

It instructs Spring Security to never create or rely on an HttpSession for authentication — every request must independently prove its identity (typically via a JWT in the Authorization header). It's the standard choice for REST APIs consumed by SPAs/mobile clients and for horizontally-scaled microservices, since it removes any need for sticky sessions or a shared session store.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.

What does SessionCreationPolicy.STATELESS actually do, and when should you use it?

Next Step

Continue to How would you handle sessions in a load-balanced, multi-instance deployment using stateful (session-cookie) authentication?← Back to all Spring Security questions