Spring Security for REST APIs: a stateless filter chain, login and JWT with the resource server
Hands-on Spring Boot 4 / Spring Security 7: a filter chain for a stateless API, password storage with DelegatingPasswordEncoder, a login endpoint with AuthenticationManager, issuing JWTs with NimbusJwtEncoder, validating them with the resource server, mapping a roles claim to ROLE_, JSON 401/403 and CORS for an SPA.