Interface OAuth2ResponseHandler<T>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@UnstableApi @FunctionalInterface public interface OAuth2ResponseHandler<T>
A functional interface to handle OAuth2 responses.
  • Method Details

    • handle

      T handle(AggregatedHttpResponse response, QueryParams requestParams)
      Handles the given AggregatedHttpResponse and returns the result.
      Throws:
      TokenRequestException - when the endpoint returns {code HTTP 400 (Bad Request)} status and the response payload contains the details of the error.
      InvalidClientException - when the endpoint returns HTTP 401 (Unauthorized) status, which typically indicates that client authentication failed (e.g.: unknown client, no client authentication included, or unsupported authentication method).
      UnsupportedMediaTypeException - if the media type of the response does not match the expected (JSON).