org.springframework.ws.soap.security.wss4j.callback
Class SpringPlainTextPasswordValidationCallbackHandler
java.lang.Object
org.springframework.ws.soap.security.callback.AbstractCallbackHandler
org.springframework.ws.soap.security.wss4j.callback.AbstractWsPasswordCallbackHandler
org.springframework.ws.soap.security.wss4j.callback.SpringPlainTextPasswordValidationCallbackHandler
- All Implemented Interfaces:
- javax.security.auth.callback.CallbackHandler, org.springframework.beans.factory.InitializingBean
public class SpringPlainTextPasswordValidationCallbackHandler
- extends AbstractWsPasswordCallbackHandler
- implements org.springframework.beans.factory.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.
- Since:
- 1.5.0
- Author:
- Arjen Poutsma
- See Also:
UsernamePasswordAuthenticationToken,
org.springframework.security.ui.basicauth.BasicProcessingFilter
| 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 java.lang.Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
handleCleanup
protected void handleCleanup(CleanupCallback callback)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
- Description copied from class:
AbstractWsPasswordCallbackHandler
- Invoked when a
CleanupCallback is passed to AbstractCallbackHandler.handle(Callback[]).
Default implementation throws an UnsupportedCallbackException.
- Overrides:
handleCleanup in class AbstractWsPasswordCallbackHandler
- Throws:
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
handleUsernameTokenUnknown
protected void handleUsernameTokenUnknown(org.apache.ws.security.WSPasswordCallback callback)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
- Description copied from class:
AbstractWsPasswordCallbackHandler
- Invoked when the callback has a
WSPasswordCallback.USERNAME_TOKEN_UNKNOWN usage.
This method is invoked for a not specified password type or a plain text password type. Only the password is set. The callback class now may check if the username and password
match. If they don't match, the subclass should throw an exception.
Default implementation throws an UnsupportedCallbackException.
- Overrides:
handleUsernameTokenUnknown in class AbstractWsPasswordCallbackHandler
- Throws:
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
Copyright © 2011. All Rights Reserved.