public class CrowdProxyServlet
extends javax.servlet.http.HttpServlet
Modifier and Type | Field and Description |
---|---|
protected static String |
AUTHORIZATION_HTTP_HEADER_KEY |
protected static String |
CROWD_CREDENTIALS |
protected static String |
HTTP_REQUEST_HEADER_CONTENT_LENGTH |
protected static String |
TRANSFER_ENCODING_HEADER_KEY |
Constructor and Description |
---|
CrowdProxyServlet(PermissionManager permissionManager) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.http.HttpRequest |
buildCrowdRequest(javax.servlet.http.HttpServletRequest incomingRequest)
Builds the request to Crowd using the incoming request to the Crowd proxy.
|
protected org.apache.http.HttpRequest |
createCrowdRequest(javax.servlet.http.HttpServletRequest incomingRequest,
String crowdUrl)
Returns a request for Crowd, including its entity body if present.
|
protected org.apache.http.HttpResponse |
executeCrowdRequest(org.apache.http.HttpRequest crowdRequest)
Executes the request to Crowd.
|
String |
getServletInfo() |
protected void |
sendResponse(org.apache.http.HttpResponse crowdResponse,
javax.servlet.http.HttpServletResponse servletResponse,
org.apache.http.RequestLine requestLine)
Sends an HTTP response based off the incoming response from Crowd.
|
void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
setCrowdRequestHeaders(javax.servlet.http.HttpServletRequest incomingRequest,
org.apache.http.HttpRequest crowdRequest)
Sets the required HTTP Headers in the request sent to Crowd resource.
|
protected void |
setResponseHeaders(org.apache.http.HttpResponse crowdResponse,
javax.servlet.http.HttpServletResponse servletResponse)
Sets the response headers, based off the ones received in the Crowd response.
|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
protected static final String AUTHORIZATION_HTTP_HEADER_KEY
protected static final String CROWD_CREDENTIALS
protected static final String HTTP_REQUEST_HEADER_CONTENT_LENGTH
protected static final String TRANSFER_ENCODING_HEADER_KEY
public CrowdProxyServlet(PermissionManager permissionManager)
public String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
getServletInfo
in class javax.servlet.GenericServlet
public void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
service
in class javax.servlet.http.HttpServlet
protected org.apache.http.HttpRequest buildCrowdRequest(javax.servlet.http.HttpServletRequest incomingRequest) throws IOException
IOException
protected org.apache.http.HttpRequest createCrowdRequest(javax.servlet.http.HttpServletRequest incomingRequest, String crowdUrl) throws IOException
IOException
protected void setCrowdRequestHeaders(javax.servlet.http.HttpServletRequest incomingRequest, org.apache.http.HttpRequest crowdRequest)
protected org.apache.http.HttpResponse executeCrowdRequest(org.apache.http.HttpRequest crowdRequest) throws IOException
IOException
protected void sendResponse(org.apache.http.HttpResponse crowdResponse, javax.servlet.http.HttpServletResponse servletResponse, org.apache.http.RequestLine requestLine) throws IOException
IOException
protected void setResponseHeaders(org.apache.http.HttpResponse crowdResponse, javax.servlet.http.HttpServletResponse servletResponse)
Copyright © 2003–2016 Atlassian. All rights reserved.