buildConnection(javax.servlet.http.HttpServletRequest request,
- String publicURLPrefix,
- String realURLPrefix,
- javax.net.ssl.SSLSocketFactory sslSocketFactory)
-
-
- Builds an HttpURLConnection to a URL which is derived
- from an HttpServletRequest URL, by substitution of a
- public URL prefix for the real URL prefix.
- The HttpURLConnection has been created by URL.openConnection(), but
- it has not yet been connected to by URLConnection.connect().
- The field settings of the HttpURLConnection are:
-
- allowUserInteraction = false
- doInput = true
- doOutput = true
- requestMethod = request.getMethod()
- useCaches = false
-
Builds an HttpURLConnection to a URL which is derived
- from an HttpServletRequest URL, by substitution of a
- public URL prefix for the real URL prefix.
- The HttpURLConnection has been created by URL.openConnection(), but
- it has not yet been connected to by URLConnection.connect().
- The field settings of the HttpURLConnection are:
-
-
allowUserInteraction = false
-
doInput = true
-
doOutput = true
-
requestMethod = request.getMethod()
-
useCaches = false
-
-
Parameters:
request - the incoming request which shall be forwarded
publicURLPrefix - the public URL prefix to be substituted by the real URL prefix
realURLPrefix - the URL prefix to substitute the public URL prefix
sslSocketFactory - factory to be used for creating an SSL socket in case
- of a URL for scheme "https:";
- if null, the default SSL socket factory would be used
Returns:
a URLConnection created by URL.openConnection(), connecting to
- the requested URL with publicURLPrefix substituted by realURLPrefix
Throws:
IOException - if an I/O exception occurs during opening the connection
Returns authentication headers to be added to a URLConnection.
-
Parameters:
authConf - configuration data
authData - authentication data
clientIPAddress - client IP address
Returns:
A map, the keys being header names and values being corresponding header values.
- In case of authentication type "basic-auth", header fields
- username and password.
- In case of authentication type "header-auth", header fields
- derived from parameter mapping and authentication data provided.
- Otherwise, an empty map.
Returns request parameters to be added to a URLConnection.
-
Parameters:
authConf - configuration data
authData - authentication data
clientIPAddress - client IP address
Returns:
A map, the keys being parameter names and values being corresponding parameter values.
- In case of authentication type "param-auth", parameters
- derived from parameter mapping and authentication data provided.
- Otherwise, an empty map.