public class AuthenticationSimpleHttpInvokerRequestExecutor
extends SimpleHttpInvokerRequestExecutor
SimpleHttpInvokerRequestExecutor
.Constructor and Description |
---|
AuthenticationSimpleHttpInvokerRequestExecutor() |
Modifier and Type | Method and Description |
---|---|
protected void |
doPrepareConnection(java.net.HttpURLConnection con,
int contentLength)
Provided so subclasses can perform additional configuration if required (eg set
additional request headers for non-security related information etc).
|
protected void |
prepareConnection(java.net.HttpURLConnection con,
int contentLength)
Called every time a HTTP invocation is made.
|
public AuthenticationSimpleHttpInvokerRequestExecutor()
protected void doPrepareConnection(java.net.HttpURLConnection con, int contentLength) throws java.io.IOException
con
- the HTTP connection to preparecontentLength
- the length of the content to sendjava.io.IOException
- if thrown by HttpURLConnection methodsprotected void prepareConnection(java.net.HttpURLConnection con, int contentLength) throws java.io.IOException
Simply allows the parent to setup the connection, and then adds an
Authorization
HTTP header property that will be used for BASIC
authentication.
The SecurityContextHolder
is used to obtain the relevant principal and
credentials.
con
- the HTTP connection to preparecontentLength
- the length of the content to sendjava.io.IOException
- if thrown by HttpURLConnection methods