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 Summary
Constructors Constructor Description ServletHttpResponse(jakarta.servlet.http.HttpServletResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsendError(int status)Send an error with the givenstatusCode.voidsendError(int status, String reason)Send an error with the givenstatusCodeandreasonmessage.voidsetHeader(String name, String value)Set a header with the givennameandvalue.
-
-
-
Method Detail
-
sendError
public void sendError(int status)
Description copied from interface:HttpResponseSend an error with the givenstatusCode.- Specified by:
sendErrorin interfaceHttpResponse- Parameters:
status- the status to set in the response
-
sendError
public void sendError(int status, String reason)Description copied from interface:HttpResponseSend an error with the givenstatusCodeandreasonmessage.- Specified by:
sendErrorin interfaceHttpResponse- Parameters:
status- the status to set in the response
-
setHeader
public void setHeader(String name, String value)
Description copied from interface:HttpResponseSet a header with the givennameandvalue.- Specified by:
setHeaderin interfaceHttpResponse- Parameters:
name- the header namevalue- the header value
-
-