public class

AuthenticationSimpleHttpInvokerRequestExecutor

extends SimpleHttpInvokerRequestExecutor
java.lang.Object
   ↳ org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor
     ↳ org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor
       ↳ org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor

Class Overview

Adds BASIC authentication support to SimpleHttpInvokerRequestExecutor.

Summary

[Expand]
Inherited Constants
From class org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor
[Expand]
Inherited Fields
From class org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor
Public Constructors
AuthenticationSimpleHttpInvokerRequestExecutor()
Protected Methods
void doPrepareConnection(HttpURLConnection con, int contentLength)
Provided so subclasses can perform additional configuration if required (eg set additional request headers for non-security related information etc).
void prepareConnection(HttpURLConnection con, int contentLength)
Called every time a HTTP invocation is made.
[Expand]
Inherited Methods
From class org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor
From class org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor
From class java.lang.Object
From interface org.springframework.remoting.httpinvoker.HttpInvokerRequestExecutor

Public Constructors

public AuthenticationSimpleHttpInvokerRequestExecutor ()

Protected Methods

protected void doPrepareConnection (HttpURLConnection con, int contentLength)

Provided so subclasses can perform additional configuration if required (eg set additional request headers for non-security related information etc).

Parameters
con the HTTP connection to prepare
contentLength the length of the content to send
Throws
IOException if thrown by HttpURLConnection methods

protected void prepareConnection (HttpURLConnection con, int contentLength)

Called every time a HTTP invocation is made.

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.

Parameters
con the HTTP connection to prepare
contentLength the length of the content to send
Throws
IOException if thrown by HttpURLConnection methods