Interface CustomTokenResponseComposer
- All Superinterfaces:
Lifecycle
Service Provider Interface (SPI) for composing custom token responses.
Implementations must be thread-safe.
This SPI can be used to include additional parameters in the token
response, such as an authorization_details
parameter required in
OAuth 2.0 Rich Authorization Requests.
The SPI allows a successful access token response to be replaced with a token error response.
-
Method Summary
Modifier and TypeMethodDescriptioncom.nimbusds.oauth2.sdk.TokenResponse
compose
(com.nimbusds.oauth2.sdk.TokenResponse originalResponse, TokenResponseContext context) Composes a custom token response.
-
Method Details
-
compose
com.nimbusds.oauth2.sdk.TokenResponse compose(com.nimbusds.oauth2.sdk.TokenResponse originalResponse, TokenResponseContext context) Composes a custom token response.- Parameters:
originalResponse
- The original success or error response. For an OpenID token response an instance ofOIDCTokenResponse
. Notnull
.context
- The token response context. Notnull
.- Returns:
- The token response to return to the client. If no customisation is required the original response.
-