OAuth 2.0 is an authorization framework for delegated access to protected resources. It separates the user, client, resource server, and authorization server: the authorization server authenticates users and clients, then issues access tokens that the client presents to a resource server. section 13.6
Implementations commonly distinguish these mechanisms:
- Use opaque tokens when the resource server validates them through authorization-server introspection; use non-opaque tokens when the token carries details, commonly as a JWT. section 13.6
- Obtain tokens through grant types such as authorization code or client credentials; add PKCE to authorization code flows when supplementary protection is needed. section 13.6
- Use refresh tokens when an application needs new access tokens without requiring the user to authenticate again. section 13.6
- Treat OpenID Connect as a protocol built over OAuth 2 that constrains the framework with values such as openid and profile scopes and an ID token. section 13.4
Spring Security clients
Configure a Spring web application to authenticate through GitHub, Google, Facebook, Okta, or another provider. Common providers supply known OAuth 2 details, while custom providers require authorization, token, and key-set URIs. For backend-to-backend calls, use the client credentials grant and Spring Security's client manager to obtain an access token. section 16.3








