What is OAuth2, and what roles do the Authorization Server, Resource Server, and Client play?
Advanced Spring Security
OAuth2 is an authorization framework letting a user grant a third-party application limited access to their resources without sharing their actual credentials. The Authorization Server authenticates the user and issues access tokens. The Resource Server hosts the protected data/API and validates incoming tokens before granting access. The Client is the application requesting access on the user's behalf. Spring Security provides dedicated modules for building each role — `spring-boot-starter-oauth2-resource-server` for validating tokens, `spring-boot-starter-oauth2-client` for acting as a client, and Spring Authorization Server for building your own token-issuing server.

