Spring Web Services Framework

org.springframework.ws.soap.security.xwss.callback.acegi
Class AcegiDigestPasswordValidationCallbackHandler

java.lang.Object
  extended by org.springframework.ws.soap.security.xwss.callback.AbstractCallbackHandler
      extended by org.springframework.ws.soap.security.xwss.callback.acegi.AcegiDigestPasswordValidationCallbackHandler
All Implemented Interfaces:
CallbackHandler

public class AcegiDigestPasswordValidationCallbackHandler
extends AbstractCallbackHandler

Callback handler that validates a password digest using an Acegi UserDetailsService. Logic based on Acegi's DigestProcessingFilter.

An Acegi UserDetailService 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.

This class only handles PasswordValidationCallbacks that contain a DigestPasswordRequest, and throws an UnsupportedCallbackException for others.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
UserDetailsService, PasswordValidationCallback, PasswordValidationCallback.DigestPasswordRequest, org.acegisecurity.ui.digestauth.DigestProcessingFilter

Field Summary
 
Fields inherited from class org.springframework.ws.soap.security.xwss.callback.AbstractCallbackHandler
logger
 
Constructor Summary
AcegiDigestPasswordValidationCallbackHandler()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  void handleInternal(Callback callback)
          Handles PasswordValidationCallbacks that contain a DigestPasswordRequest, and throws an UnsupportedCallbackException for others
 void setUserCache(org.acegisecurity.providers.dao.UserCache userCache)
          Sets the users cache.
 void setUserDetailsService(org.acegisecurity.userdetails.UserDetailsService userDetailsService)
          Sets the Acegi user details service.
 
Methods inherited from class org.springframework.ws.soap.security.xwss.callback.AbstractCallbackHandler
handle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcegiDigestPasswordValidationCallbackHandler

public AcegiDigestPasswordValidationCallbackHandler()
Method Detail

setUserCache

public void setUserCache(org.acegisecurity.providers.dao.UserCache userCache)
Sets the users cache. Not required, but can benefit performance.


setUserDetailsService

public void setUserDetailsService(org.acegisecurity.userdetails.UserDetailsService userDetailsService)
Sets the Acegi user details service. Required.


afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Throws:
Exception

handleInternal

protected void handleInternal(Callback callback)
                       throws IOException,
                              UnsupportedCallbackException
Handles PasswordValidationCallbacks that contain a DigestPasswordRequest, and throws an UnsupportedCallbackException for others

Specified by:
handleInternal in class AbstractCallbackHandler
Throws:
UnsupportedCallbackException - when the callback is not supported
IOException

Spring Web Services Framework

Copyright � 2005-2008 The Spring Web Services Framework. All Rights Reserved.