Interface RequestHandler<RequestModel>

All Superinterfaces:
HasValidatableRequestModel<RequestModel>
All Known Subinterfaces:
ActionCompletionRequestHandler<RequestModel>, AnonymousRequestHandler<RequestModel>, AuthenticatorRequestHandler<RequestModel>, ConsentorCompletionRequestHandler<RequestModel>, RegistrationRequestHandler<RequestModel>

public interface RequestHandler<RequestModel> extends HasValidatableRequestModel<RequestModel>
A HTTP Request handler.

Request handlers use a RequestModel to represent a Request.

The RequestModel may be simply an instance of a Request, in which case no validation is performed by the server.

The Request model may also be a validatable Object that is built from a Request, in which case the plugin should use Hibernate Validator annotations on the RequestModel fields (check the server documentation for the current Hibernate Validator version that is required), which the Identity Server will be able to automatically validate before calling the get(Object, Response) and post(Object, Response) handlers.

Since:
2.1.0
  • Method Details

    • get

      Object get(RequestModel requestModel, Response response)
      Handle a GET HTTP request.
      Parameters:
      requestModel - the validated request model
      response - response
      Returns:
      an Object representing the result of handling a GET request. Request handlers for specific purposes will restrict what kind of Object may be returned.
      See Also:
    • post

      Object post(RequestModel requestModel, Response response)
      Handle a POST HTTP request.
      Parameters:
      requestModel - the validated request model
      response - response
      Returns:
      an Object representing the result of handling a POST request. Request handlers for specific purposes will restrict what kind of Object may be returned.
      See Also: