liveBook · Manning

OAuth

As explained in Software Security for Developers

OAuth is an authorization framework that enables delegated access to protected resources without sharing the resource owner's credentials with the resource server.

OAuth 2.0 is an authorization framework for letting an application obtain permission to access protected resources without handling the user’s password. It separates authentication and authorization responsibilities into an identity provider (IdP), client, and resource server. section 12.2 section 13.0

This separation supports single sign-on: employees and customers can use one existing account across multiple applications instead of creating and storing credentials everywhere. OAuth 2.0 provides authorization; OpenID Connect adds authentication and user identity. section 12.0 section 13.5

The main actors and mechanisms are:

  • The user owns the protected data; the client is the web, mobile, or service application used directly. section 12.2
  • The IdP, also called the authorization server, authenticates users and manages client details; the resource server protects backend resources and applies authorization. section 12.2
  • The authorization code grant handles user interaction, while the client credentials grant authenticates one application to another without user involvement. section 12.5
  • Access tokens authorize requests; ID tokens carry user information in OIDC, commonly using JWTs with claims and a signature. section 12.5
  • PKCE strengthens authorization for public clients, and refresh tokens obtain new short-lived access tokens without repeated login; protect, rotate, expire, and revoke refresh tokens. section 13.0 section 13.5

A practical SSO scenario

An employee uses several ACME applications during the workday, while a customer wants to use an existing social-login account for the online store. An IdP handles authentication once, clients obtain tokens, and each resource server uses those tokens to authorize access. The applications avoid collecting another set of usernames and passwords. section 12.0 section 12.5

How Software Security for Developers covers it

How deep it goes
Explains actors, grant types, tokens, PKCE, and refresh-token handling, while deferring complete protocol implementation details.
Examples
Uses employee SSO, social login, authorization-code flows, client credentials, JWTs, PKCE, and refresh-token scenarios.
What it assumes
Assumes standard object-oriented programming knowledge while building familiarity with authentication, authorization, TLS, and related security foundations.
What you can do after
Apply OAuth 2.0 and OIDC flows to design delegated access, SSO, token validation, and safer user sessions.
How it connects
Connects authorization with OpenID Connect, single sign-on, identity providers, resource servers, JWTs, PKCE, and refresh tokens.

Also explained in

Compare how 9 books explain OAuth →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.