com.atlassian.confluence.plugins.crowdproxy
Class CrowdProxyServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.atlassian.confluence.plugins.crowdproxy.CrowdProxyServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class CrowdProxyServlet
extends javax.servlet.http.HttpServlet

Provide access to the Crowd REST API to system administrators in OnDemand. It's protected from access outside of the host. For testing purposes only.

See Also:
Serialized Form

Field Summary
protected static String AUTHORIZATION_HTTP_HEADER_KEY
           
protected static String CROWD_CREDENTIALS
           
protected static String HTTP_REQUEST_HEADER_CONTENT_LENGTH
           
 
Constructor Summary
CrowdProxyServlet(PermissionManager permissionManager)
           
 
Method Summary
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  void buildResponse(org.apache.http.HttpResponse crowdResponse, javax.servlet.http.HttpServletResponse response)
          Sends an HTTP response based off the incoming response from Crowd.
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()
           
 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 response)
          Sets the response headers, based off the ones received in the Crowd response.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTHORIZATION_HTTP_HEADER_KEY

protected static final String AUTHORIZATION_HTTP_HEADER_KEY
See Also:
Constant Field Values

CROWD_CREDENTIALS

protected static final String CROWD_CREDENTIALS
See Also:
Constant Field Values

HTTP_REQUEST_HEADER_CONTENT_LENGTH

protected static final String HTTP_REQUEST_HEADER_CONTENT_LENGTH
See Also:
Constant Field Values
Constructor Detail

CrowdProxyServlet

public CrowdProxyServlet(PermissionManager permissionManager)
Method Detail

getServletInfo

public String getServletInfo()
Specified by:
getServletInfo in interface javax.servlet.Servlet
Overrides:
getServletInfo in class javax.servlet.GenericServlet

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
Overrides:
service in class javax.servlet.http.HttpServlet

buildCrowdRequest

protected org.apache.http.HttpRequest buildCrowdRequest(javax.servlet.http.HttpServletRequest incomingRequest)
                                                 throws IOException
Builds the request to Crowd using the incoming request to the Crowd proxy.

Throws:
IOException

createCrowdRequest

protected org.apache.http.HttpRequest createCrowdRequest(javax.servlet.http.HttpServletRequest incomingRequest,
                                                         String crowdUrl)
                                                  throws IOException
Returns a request for Crowd, including its entity body if present.

Throws:
IOException

setCrowdRequestHeaders

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.


executeCrowdRequest

protected org.apache.http.HttpResponse executeCrowdRequest(org.apache.http.HttpRequest crowdRequest)
                                                    throws IOException
Executes the request to Crowd.

Throws:
IOException

buildResponse

protected void buildResponse(org.apache.http.HttpResponse crowdResponse,
                             javax.servlet.http.HttpServletResponse response)
                      throws IOException
Sends an HTTP response based off the incoming response from Crowd.

Throws:
IOException

setResponseHeaders

protected void setResponseHeaders(org.apache.http.HttpResponse crowdResponse,
                                  javax.servlet.http.HttpServletResponse response)
Sets the response headers, based off the ones received in the Crowd response.



Copyright © 2003–2015 Atlassian. All rights reserved.