org.springframework.richclient.security.remoting
Class BasicAuthHttpInvokerProxyFactoryBean
java.lang.Object
org.springframework.remoting.support.RemotingSupport
org.springframework.remoting.support.RemoteAccessor
org.springframework.remoting.support.UrlBasedRemoteAccessor
org.springframework.remoting.support.RemoteInvocationBasedAccessor
org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor
org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean
org.springframework.richclient.security.remoting.BasicAuthHttpInvokerProxyFactoryBean
- All Implemented Interfaces:
- org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, BeanClassLoaderAware, FactoryBean, InitializingBean, HttpInvokerClientConfiguration, AuthenticationAware
public class BasicAuthHttpInvokerProxyFactoryBean
- extends HttpInvokerProxyFactoryBean
- implements AuthenticationAware
Extension of HttpInvokerProxyFactoryBean
that supports the use of BASIC
authentication on each HTTP request. This factory takes care of instantiating the
proper invocation executor, BasicAuthHttpInvokerRequestExecutor
, and keeping
it up to date with the latest user credentials. Once a more complete AOP implementation
is available, then this "token forwarding" can be removed as the default executor is
already wired to receive notifications when it is constructed by the application
context.
This configuration assumes that the user's credentials are "global" to the application
and every invocation should use the same credentials. If you need per-thread
authentication then you should look at using a combination of
HttpInvokerProxyFactoryBean
and
org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor
.
AuthenticationAware
is implemented in order to get notifications of changes in
the user's credentials. Please see the class documentation for
AuthenticationAware
to see how to configure the application context so
that authentication changes are broadcast properly.
- Author:
- Larry Streepy
Method Summary |
void |
setAuthenticationToken(org.springframework.security.Authentication authentication)
Handle a change in the current authentication token. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicAuthHttpInvokerProxyFactoryBean
public BasicAuthHttpInvokerProxyFactoryBean()
- Constructor. Install the default executor.
setAuthenticationToken
public void setAuthenticationToken(org.springframework.security.Authentication authentication)
- Handle a change in the current authentication token. Pass it along to the executor
if it's of the proper type.
- Specified by:
setAuthenticationToken
in interface AuthenticationAware
- Parameters:
authentication
- token- See Also:
BasicAuthHttpInvokerRequestExecutor
,
AuthenticationAware.setAuthenticationToken(org.springframework.security.Authentication)
Copyright © 2004-2009 The Spring Framework. All Rights Reserved.