public class RemoteAuthenticationManagerImpl extends Object implements RemoteAuthenticationManager, InitializingBean
This bean requires no security interceptor to protect it. Instead, the bean uses the
configured AuthenticationManager
to resolve an authentication request.
Constructor and Description |
---|
RemoteAuthenticationManagerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
Collection<? extends GrantedAuthority> |
attemptAuthentication(String username,
String password)
Attempts to authenticate the remote client using the presented username and
password.
|
protected AuthenticationManager |
getAuthenticationManager() |
void |
setAuthenticationManager(AuthenticationManager authenticationManager) |
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public Collection<? extends GrantedAuthority> attemptAuthentication(String username, String password) throws RemoteAuthenticationException
RemoteAuthenticationManager
GrantedAuthority
objects will be returned.
In order to maximise remoting protocol compatibility, a design decision was taken to operate with minimal arguments and return only the minimal amount of information required for remote clients to enable/disable relevant user interface commands etc. There is nothing preventing users from implementing their own equivalent package that works with more complex object types.
attemptAuthentication
in interface RemoteAuthenticationManager
username
- the username the remote client wishes to authenticate with.password
- the password the remote client wishes to authenticate with.RemoteAuthenticationException
- if the authentication failed.protected AuthenticationManager getAuthenticationManager()
public void setAuthenticationManager(AuthenticationManager authenticationManager)