Class ServletHttpResponse

java.lang.Object
org.keycloak.adapters.authorization.integration.elytron.ServletHttpResponse
All Implemented Interfaces:
HttpResponse

public class ServletHttpResponse extends Object implements HttpResponse
Author:
Pedro Igor
  • Constructor Details

    • ServletHttpResponse

      public ServletHttpResponse(jakarta.servlet.http.HttpServletResponse response)
  • Method Details

    • sendError

      public void sendError(int status)
      Description copied from interface: HttpResponse
      Send an error with the given statusCode.
      Specified by:
      sendError in interface HttpResponse
      Parameters:
      status - the status to set in the response
    • sendError

      public void sendError(int status, String reason)
      Description copied from interface: HttpResponse
      Send an error with the given statusCode and reason message.
      Specified by:
      sendError in interface HttpResponse
      Parameters:
      status - the status to set in the response
    • setHeader

      public void setHeader(String name, String value)
      Description copied from interface: HttpResponse
      Set a header with the given name and value.
      Specified by:
      setHeader in interface HttpResponse
      Parameters:
      name - the header name
      value - the header value