Interface CustomTokenResponseComposer


  • public interface CustomTokenResponseComposer
    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.

    • Method Detail

      • 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 of OIDCTokenResponse. Not null.
        context - The token response context. Not null.
        Returns:
        The token response to return to the client. If no customisation is required the original response.