An introspection URI lets a resource server ask an authorization server whether an access token is valid and retrieve metadata needed for authorization. section 15.5
Configure opaque-token validation with three values:
- The authorization server’s introspection URI. section 15.3
- The resource server client ID and secret, used to authenticate the introspection request. section 15.3
- Spring Security’s opaqueToken() configuration, which connects the URI and credentials to the resource server. section 15.3
Spring Security configuration
Set introspectionUri, resourceServerClientID, and resourceServerSecret from properties, then pass them to opaqueToken(). Require authentication with anyRequest().authenticated(). section 15.3
Figure 15.6 Token introspection. In situations where the resource server cannot depend on signature-based validation of access tokens (such as when token revocation is necessary), or when the token does not contain detailed information (as with opaque tokens), the resource server is required to make inquiries to the authorization server. This is done to ascertain the validity of a token and to gather additional information about it.
Token introspection is required when tokens are opaque or when authorization-server revocation must be recognized, including for otherwise non-opaque tokens. section 15.3
