Class SimplePasswordValidationCallbackHandler
java.lang.Object
org.springframework.ws.soap.security.callback.AbstractCallbackHandler
org.springframework.ws.soap.security.wss4j2.callback.AbstractWsPasswordCallbackHandler
org.springframework.ws.soap.security.wss4j2.callback.SimplePasswordValidationCallbackHandler
- All Implemented Interfaces:
CallbackHandler,org.springframework.beans.factory.InitializingBean
public class SimplePasswordValidationCallbackHandler
extends AbstractWsPasswordCallbackHandler
implements org.springframework.beans.factory.InitializingBean
Simple callback handler that validates passwords against a in-memory
Properties
object. Password validation is done on a case-sensitive basis.- Since:
- 2.3.0
- See Also:
-
Field Summary
Fields inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidhandleUsernameToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.USERNAME_TOKENusage.voidsetUsers(Properties users) Sets the users to validate against.voidsetUsersMap(Map<String, String> users) Methods inherited from class org.springframework.ws.soap.security.wss4j2.callback.AbstractWsPasswordCallbackHandler
handleCleanup, handleCustomToken, handleDecrypt, handleInternal, handleSecretKey, handleSecurityContextToken, handleSignature, handleUsernameTokenPrincipalMethods inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler
handle
-
Constructor Details
-
SimplePasswordValidationCallbackHandler
public SimplePasswordValidationCallbackHandler()
-
-
Method Details
-
setUsers
Sets the users to validate against. Property names are usernames, property values are passwords. -
setUsersMap
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
handleUsernameToken
public void handleUsernameToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException Description copied from class:AbstractWsPasswordCallbackHandlerInvoked when the callback has aWSPasswordCallback.USERNAME_TOKENusage.This method is invoked when WSS4J needs the password to fill in or to verify a UsernameToken.
Default implementation throws an
UnsupportedCallbackException.- Overrides:
handleUsernameTokenin classAbstractWsPasswordCallbackHandler- Throws:
IOExceptionUnsupportedCallbackException
-