Spring Web Services Framework

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

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

public class AcegiCertificateValidationCallbackHandler
extends AbstractCallbackHandler

Callback handler that validates a certificate using an Acegi AuthenticationManager. Logic based on Acegi's X509ProcessingFilter.

An Acegi X509AuthenticationToken is created with the certificate as the credentials.

The configured authentication manager is expected to supply a provider which can handle this token (usually an instance of X509AuthenticationProvider).

This class only handles CertificateValidationCallbacks, and throws an UnsupportedCallbackException for others.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
X509AuthenticationToken, X509AuthenticationProvider, org.acegisecurity.ui.x509.X509ProcessingFilter, CertificateValidationCallback

Field Summary
 
Fields inherited from class org.springframework.ws.soap.security.xwss.callback.AbstractCallbackHandler
logger
 
Constructor Summary
AcegiCertificateValidationCallbackHandler()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  void handleInternal(Callback callback)
          Handles CertificateValidationCallbacks, and throws an UnsupportedCallbackException for others
 void setAuthenticationManager(org.acegisecurity.AuthenticationManager authenticationManager)
          Sets the Acegi authentication manager.
 void setIgnoreFailure(boolean ignoreFailure)
           
 
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

AcegiCertificateValidationCallbackHandler

public AcegiCertificateValidationCallbackHandler()
Method Detail

setAuthenticationManager

public void setAuthenticationManager(org.acegisecurity.AuthenticationManager authenticationManager)
Sets the Acegi authentication manager. Required.


setIgnoreFailure

public void setIgnoreFailure(boolean ignoreFailure)

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Throws:
Exception

handleInternal

protected void handleInternal(Callback callback)
                       throws IOException,
                              UnsupportedCallbackException
Handles CertificateValidationCallbacks, 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.