liveBook · Manning

Claim

As explained in Spring Security in Action, Second Edition

A claim is a named assertion about a subject or other token property carried in a JSON Web Token.

A claim is a named assertion about a subject or another token property carried in a JSON Web Token. Custom claims transfer application-specific values from an authorization server to a resource server, where they can support authorization rules. section 15.2 section 15.0

A Spring Security implementation can use a claim through this sequence:

  • Use the resulting authentication value when implementing an authorization rule. section 15.2

How Spring Security in Action, Second Edition covers it

How deep it goes
Explains creation, JWT decoding, authentication conversion, and framework configuration, stopping short of detailed claim-setting business logic.
Examples
Uses a priority claim set to HIGH, decoded JWT JSON, a custom authentication class, and a /demo response.
What it assumes
Assumes an OAuth 2 resource server and JWT access-token flow, then teaches custom claim handling incrementally.
What you can do after
Apply it via Spring Security to carry token data into authentication and use that data in authorization rules.
How it connects
Connects JWTs, access tokens, OAuth 2 authorization servers, resource servers, authentication objects, security contexts, and authorization rules.

Also explained in

Compare how 7 books explain claim →

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.