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
- Author:
- Tareq Abed Rabbo, Arjen Poutsma, Jamin Hitchcock
- See Also:
-
Field Summary
Fields inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
handleUsernameToken
(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.USERNAME_TOKEN
usage.void
setUsers
(Properties users) Sets the users to validate against.void
setUsersMap
(Map<String, String> users) Methods inherited from class org.springframework.ws.soap.security.wss4j2.callback.AbstractWsPasswordCallbackHandler
handleCleanup, handleCustomToken, handleDecrypt, handleInternal, handleSecretKey, handleSecurityContextToken, handleSignature, handleUsernameTokenPrincipal
Methods 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:
afterPropertiesSet
in 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:AbstractWsPasswordCallbackHandler
Invoked when the callback has aWSPasswordCallback.USERNAME_TOKEN
usage.This method is invoked when WSS4J needs the password to fill in or to verify a UsernameToken.
Default implementation throws an
UnsupportedCallbackException
.- Overrides:
handleUsernameToken
in classAbstractWsPasswordCallbackHandler
- Throws:
IOException
UnsupportedCallbackException
-