org.springframework.ws.soap.security.xwss.callback
Class SpringPlainTextPasswordValidationCallbackHandler
java.lang.Object
org.springframework.ws.soap.security.callback.AbstractCallbackHandler
org.springframework.ws.soap.security.xwss.callback.SpringPlainTextPasswordValidationCallbackHandler
- All Implemented Interfaces:
- CallbackHandler, InitializingBean
public class SpringPlainTextPasswordValidationCallbackHandler
- extends AbstractCallbackHandler
- implements InitializingBean
Callback handler that validates a certificate uses an Spring Security AuthenticationManager
. Logic based
on Spring Security's BasicProcessingFilter
.
This handler requires an Spring Security AuthenticationManager
to operate. It can be set using the
authenticationManager
property. An Spring Security UsernamePasswordAuthenticationToken
is
created with the username as principal and password as credentials.
This class only handles PasswordValidationCallback
s that contain a
PlainTextPasswordRequest
, and throws an UnsupportedCallbackException
for others.
- Since:
- 1.5.0
- Author:
- Arjen Poutsma
- See Also:
UsernamePasswordAuthenticationToken
,
PasswordValidationCallback
,
PasswordValidationCallback.PlainTextPasswordRequest
Method Summary |
void |
afterPropertiesSet()
|
protected void |
handleInternal(Callback callback)
Handles PasswordValidationCallback s that contain a PlainTextPasswordRequest , and throws
an UnsupportedCallbackException for others. |
void |
setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
Sets the Spring Security authentication manager. |
void |
setIgnoreFailure(boolean ignoreFailure)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringPlainTextPasswordValidationCallbackHandler
public SpringPlainTextPasswordValidationCallbackHandler()
setAuthenticationManager
public void setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
- Sets the Spring Security authentication manager. Required.
setIgnoreFailure
public void setIgnoreFailure(boolean ignoreFailure)
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
Exception
handleInternal
protected void handleInternal(Callback callback)
throws IOException,
UnsupportedCallbackException
- Handles
PasswordValidationCallback
s that contain a PlainTextPasswordRequest
, and throws
an UnsupportedCallbackException
for others.
- Specified by:
handleInternal
in class AbstractCallbackHandler
- Throws:
UnsupportedCallbackException
- when the callback is not supported
IOException
Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.