Skip to main content

Spring Security, JWT, refresh tokens and roles

Learn Spring Security, JWT, refresh tokens and roles (Module 23 · Angular with Spring Boot, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Who are you, and what may you do? • Authentication = proving who you are (login). Authorization = what you are allowed to do (roles). • Spring Security integration : a filter chain in front of every controller. For a single-page app the API is stateless : no server session, each request carries a token. • JWT authentication : after login the server returns a signed JSON Web Token (header.payload.signature). Angular stores it and sends Authorization: Bearer <token> on every call. Think of it as a signed wristband at a festival: staff check the signature, not a guest list. • The payload is only...

More lessons in Module 23 · Angular with Spring Boot