Class SpringSecurityPasswordValidationCallbackHandler
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.SpringSecurityPasswordValidationCallbackHandler
- All Implemented Interfaces:
CallbackHandler,org.springframework.beans.factory.InitializingBean
public class SpringSecurityPasswordValidationCallbackHandler
extends AbstractWsPasswordCallbackHandler
implements org.springframework.beans.factory.InitializingBean
Callback handler that validates a plain text or digest password using an Spring
Security
UserDetailsService.
An Spring Security UserDetailsService is used to load UserDetails from.
The digest of the password contained in this details object is then compared with the
digest in the message.
- Since:
- 2.3.0
-
Field Summary
Fields inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidhandleCleanup(CleanupCallback callback) Invoked when aCleanupCallbackis passed toAbstractCallbackHandler.handle(Callback[]).protected voidhandleUsernameToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.USERNAME_TOKENusage.protected voidInvoked when aUsernameTokenPrincipalCallbackis passed toAbstractCallbackHandler.handle(Callback[]).voidsetUserCache(org.springframework.security.core.userdetails.UserCache userCache) Sets the users cache.voidsetUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService userDetailsService) Sets the Spring Security user details service.Methods inherited from class org.springframework.ws.soap.security.wss4j2.callback.AbstractWsPasswordCallbackHandler
handleCustomToken, handleDecrypt, handleInternal, handleSecretKey, handleSecurityContextToken, handleSignatureMethods inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler
handle
-
Constructor Details
-
SpringSecurityPasswordValidationCallbackHandler
public SpringSecurityPasswordValidationCallbackHandler()
-
-
Method Details
-
setUserCache
public void setUserCache(org.springframework.security.core.userdetails.UserCache userCache) Sets the users cache. Not required, but can benefit performance. -
setUserDetailsService
public void setUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService userDetailsService) Sets the Spring Security user details service. Required. -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
handleUsernameToken
protected void handleUsernameToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException Invoked 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
-
handleUsernameTokenPrincipal
protected void handleUsernameTokenPrincipal(UsernameTokenPrincipalCallback callback) throws IOException, UnsupportedCallbackException Description copied from class:AbstractWsPasswordCallbackHandlerInvoked when aUsernameTokenPrincipalCallbackis passed toAbstractCallbackHandler.handle(Callback[]).Default implementation throws an
UnsupportedCallbackException.- Overrides:
handleUsernameTokenPrincipalin classAbstractWsPasswordCallbackHandler- Throws:
IOExceptionUnsupportedCallbackException
-
handleCleanup
protected void handleCleanup(CleanupCallback callback) throws IOException, UnsupportedCallbackException Description copied from class:AbstractWsPasswordCallbackHandlerInvoked when aCleanupCallbackis passed toAbstractCallbackHandler.handle(Callback[]).Default implementation throws an
UnsupportedCallbackException.- Overrides:
handleCleanupin classAbstractWsPasswordCallbackHandler- Throws:
IOExceptionUnsupportedCallbackException
-