OAuth Reference

This section documents OAuth 2.0 (RFC 6749) as amended by the OAuth 2.0 Security Best Current Practice (RFC 9700 / BCP 240), the OAuth 1.0 Protocol (RFC 5849) for historical context, and OpenID Connect Core 1.0, as published at the IETF Datatracker and the OpenID Foundation specifications — and, on the Spring pages, Spring Boot 4.1.x and Spring Security 7.1.x as published at the Spring Security reference documentation — which are the references these pages are written and verified against.

OAuth 2.1 is still an Internet-Draft (draft-ietf-oauth-v2-1-16, 3 September 2026) and is flagged as such everywhere it appears on these pages. It is a working-group consolidation in progress, not a published standard; nothing here should be read as saying otherwise.

This content was generated with the assistance of AI and should be verified against those official specifications before being relied on in production.

This section’s bibliography lists the reference material consulted while preparing these pages.

Welcome to the OAuth reference. OAuth is a delegated authorization framework: it lets a user grant an application limited access to their data on another service, without ever handing that application their password. It is not an authentication protocol on its own — that is what OpenID Connect adds on top of it, and confusing the two is the most common and most expensive mistake in this area.

This section is protocol-first. It documents what the specifications actually say — OAuth 1.0a (RFC 5849), OAuth 2.0 (RFC 6749) as amended by the Security Best Current Practice (RFC 9700), the in-progress OAuth 2.1 consolidation, OpenID Connect Core 1.0, and the surrounding extension RFCs — with real HTTP requests and responses rather than library calls. Only the last three pages map all of that onto Spring Boot.

If you are new to OAuth, read Getting Started with OAuth first, then Choosing an OAuth Flow, Authorization Code and PKCE and Access and Refresh Tokens. Everything after that builds on those foundations.

For the Spring Boot services this protocol secures, see the sibling SpringBoot Reference — in particular Spring Security and Authorization Server & Social Login, which this section links to rather than duplicating. For securing a GraphQL surface, see GraphQL Authorization.

What’s covered

Foundations

  • Getting Started with OAuth — the problem OAuth solves, the four roles, confidential vs. public clients, the endpoints, and a complete authorization-code round-trip.

  • How OAuth Evolved — from the proprietary pre-OAuth protocols through OAuth 1.0, 1.0a and WRAP to RFC 6749, the extension decade, and the OAuth 2.1 draft.

  • OAuth 1.0a — the three-legged dance, the signature base string, the signature methods, and where it still survives.

  • OAuth 1.0 vs. OAuth 2.0 — each 1.0 limitation and what 2.0 did about it, plus an honest account of what 2.0 gave up in exchange.

Tokens

  • Access and Refresh Tokens — bearer vs. sender-constrained, by-value vs. by-reference, the token response, and refresh-token rotation and reuse detection.

  • ID Tokens vs. Access Tokens — what each one is for, why swapping them is broken, and a comparison of all three token types.

  • JWT and the JOSE Family — JWS, JWE, JWK and JWA, the claim set, algorithm choice, the classic attacks, JWKS and key rotation, and a resource-server validation checklist.

  • Opaque Tokens, Introspection and Revocation — introspection, revocation, token status lists, and choosing between JWT and opaque tokens.

  • Scopes, Claims and Permissions — scopes vs. claims vs. roles, resource indicators, Rich Authorization Requests, step-up, and where the decision belongs.

Flows

App types

  • Native and Mobile Apps — why embedded WebViews are forbidden, in-app browser tabs, the three redirect-URI options, and what a real browser buys you.

  • Browser-Based Apps (SPAs) — the browser threat model, the backend-for-frontend pattern, and the browser-only variant with its residual risks.

Security

OpenID Connect and identity

Operating

Spring Boot integration

  • Spring Boot Integration: Overview — the three roles a Spring service can play, a protocol-concept to Spring-type dictionary, and what is already documented elsewhere in this repository.

  • Spring Boot Flow Recipes — one minimal recipe per grant type, including the ones the SpringBoot reference does not already cover.

  • Spring Boot Authentication Methods — one-time token login, passkeys, multi-factor authentication, what Spring does not implement, and emitting amr/acr/auth_time.

Reference

  • OAuth Cheat Sheet — a one-page, printable summary of the whole section, with a downloadable PDF.

Bibliography

The book above is a consulted reference only. It is not the primary reference for any page, and wherever it and the specifications disagree — or wherever it is silent on something standardised after 2012 — the IETF RFCs and the OpenID Connect specifications are authoritative.