liveBook · Manning

Revocation

As explained in Spring Security in Action, Second Edition

Token revocation is the process of invalidating a token before its normal expiration so that it can no longer be used.

Token revocation invalidates an access token before its normal expiration, such as after discovering that a token was stolen. Spring Security authorization servers enable the revocation feature by default. section 14.5

Use the authorization server’s revocation endpoint to:

  • Submit the token to revoke with HTTP Basic authentication using the client credentials. section 14.5
  • Validate the result through introspection; a revoked token is reported inactive even when its time to live remains. section 14.5
  • Account for the performance cost: revocation requires introspection on every call, including when using non-opaque tokens. section 14.5

Revoke and verify a token

POST the token to /oauth2/revoke with client authentication, then POST it to /oauth2/introspect and confirm that it is no longer active.

How Spring Security in Action, Second Edition covers it

How deep it goes
Explains the endpoint workflow, default activation, introspection requirement, and performance trade-off without implementation internals.
Examples
Uses cURL requests against the revocation and introspection endpoints with HTTP Basic client authentication.
What it assumes
Assumes OAuth 2 authorization-server and client-credential basics while treating token invalidation and introspection operationally.
What you can do after
Operate token revocation and verify that introspection marks the revoked token inactive.
How it connects
Connects access tokens with OAuth 2 authorization servers, introspection, opaque tokens, and resource servers.

Also explained in

Compare how 4 books explain revocation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Security in Action, Second Edition. The section links point to the parts of the book it draws on.