Skip to main content

JWT Authentication

Learn JWT Authentication (Spring Security, Spring Boot) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

The Problem Stateless Auth Solves Classic form login stores the logged-in user in an HTTP session . The browser holds a JSESSIONID cookie, and the server holds a map from that id to the user. That works perfectly on one machine and starts falling apart the moment there are two. The usual patches each cost something: Mobile apps and third-party API clients have no cookie jar to begin with, which is the other reason token auth became the default for REST APIs.

More lessons in Spring Security