org.apache.servicemix.soap.handlers.security
Class WSSecurityHandler

java.lang.Object
  extended by org.apache.ws.security.handler.WSHandler
      extended by org.apache.servicemix.soap.handlers.security.WSSecurityHandler
All Implemented Interfaces:
Handler

public class WSSecurityHandler
extends org.apache.ws.security.handler.WSHandler
implements Handler

WS-Security handler. This handler is heavily based on xfire-ws-security project.


Nested Class Summary
protected  class WSSecurityHandler.DefaultHandler
           
 
Field Summary
 
Fields inherited from class org.apache.ws.security.handler.WSHandler
cryptos, secEngine
 
Constructor Summary
WSSecurityHandler()
           
 
Method Summary
protected  void checkUser(java.lang.String user, java.lang.Object credentials)
           
 java.lang.String getActor()
           
 AuthenticationService getAuthenticationService()
           
 org.apache.ws.security.components.crypto.Crypto getCrypto()
           
 java.lang.String getDomain()
           
 java.lang.String getKeystore()
           
 java.lang.Object getOption(java.lang.String key)
           
 java.lang.String getPassword(java.lang.Object msgContext)
           
 java.lang.Object getProperty(java.lang.Object msgContext, java.lang.String key)
           
 java.lang.String getReceiveAction()
           
 java.lang.String getSendAction()
           
 java.lang.String getUsername()
           
protected  void init(Context context)
           
 boolean isRequired()
           
protected  org.apache.ws.security.components.crypto.Crypto loadDecryptionCrypto(org.apache.ws.security.handler.RequestData reqData)
           
protected  org.apache.ws.security.components.crypto.Crypto loadEncryptionCrypto(org.apache.ws.security.handler.RequestData reqData)
           
 org.apache.ws.security.components.crypto.Crypto loadSignatureCrypto(org.apache.ws.security.handler.RequestData reqData)
           
 void onAnswer(Context context)
           
 void onFault(Context context)
           
 void onReceive(Context context)
           
 void onReply(Context context)
           
 void onSend(Context context)
           
 boolean requireDOM()
           
 void setActor(java.lang.String actor)
           
 void setAuthenticationService(AuthenticationService authenticationService)
           
 void setCrypto(org.apache.ws.security.components.crypto.Crypto crypto)
           
 void setDomain(java.lang.String domain)
           
 void setHandler(javax.security.auth.callback.CallbackHandler handler)
           
 void setKeystore(java.lang.String keystore)
           
 void setOption(java.lang.String key, java.lang.Object value)
           
 void setPassword(java.lang.Object msgContext, java.lang.String password)
           
 void setProperty(java.lang.Object msgContext, java.lang.String key, java.lang.Object value)
           
 void setReceiveAction(java.lang.String receiveAction)
           
 void setRequired(boolean required)
           
 void setSendAction(java.lang.String action)
           
 void setUsername(java.lang.String username)
           
 
Methods inherited from class org.apache.ws.security.handler.WSHandler
checkReceiverResults, checkReceiverResultsAnyOrder, checkSignatureConfirmation, decodeBooleanConfigValue, decodeBSPCompliance, decodeCustomPasswordTypes, decodeDecryptionParameter, decodeEnableSignatureConfirmation, decodeEncryptionParameter, decodeFutureTimeToLive, decodeMustUnderstand, decodeNamespaceQualifiedPasswordTypes, decodePasswordType, decodePasswordTypeStrict, decodeSignatureParameter, decodeSignatureParameter2, decodeTimestampPrecision, decodeTimestampStrict, decodeTimeToLive, decodeUseEncodedPasswords, decodeUseSingleCertificate, decodeUTParameter, doReceiverAction, doSenderAction, getCallbackHandler, getClassLoader, getPasswordCallbackHandler, getPasswordCB, getString, getStringOption, loadCrypto, loadCryptoFromPropertiesFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSSecurityHandler

public WSSecurityHandler()
Method Detail

getAuthenticationService

public AuthenticationService getAuthenticationService()
Returns:
the authenticationService

setAuthenticationService

public void setAuthenticationService(AuthenticationService authenticationService)
Parameters:
authenticationService - the authenticationService to set

getUsername

public java.lang.String getUsername()
Returns:
the username

setUsername

public void setUsername(java.lang.String username)
Parameters:
username - the username to set

getCrypto

public org.apache.ws.security.components.crypto.Crypto getCrypto()
Returns:
the crypto

setCrypto

public void setCrypto(org.apache.ws.security.components.crypto.Crypto crypto)
Parameters:
crypto - the crypto to set

getActor

public java.lang.String getActor()
Returns:
the actor

setActor

public void setActor(java.lang.String actor)
Parameters:
actor - the actor to set

getDomain

public java.lang.String getDomain()
Returns:
the domain

setDomain

public void setDomain(java.lang.String domain)
Parameters:
domain - the domain to set

getReceiveAction

public java.lang.String getReceiveAction()
Returns:
the receiveAction

setReceiveAction

public void setReceiveAction(java.lang.String receiveAction)
Parameters:
receiveAction - the receiveAction to set

getSendAction

public java.lang.String getSendAction()
Returns:
the action

setSendAction

public void setSendAction(java.lang.String action)
Parameters:
action - the action to set

isRequired

public boolean isRequired()
Specified by:
isRequired in interface Handler
Returns:
the required

requireDOM

public boolean requireDOM()
Specified by:
requireDOM in interface Handler

setRequired

public void setRequired(boolean required)
Specified by:
setRequired in interface Handler
Parameters:
required - the required to set

getOption

public java.lang.Object getOption(java.lang.String key)
Specified by:
getOption in class org.apache.ws.security.handler.WSHandler

setOption

public void setOption(java.lang.String key,
                      java.lang.Object value)

getPassword

public java.lang.String getPassword(java.lang.Object msgContext)
Specified by:
getPassword in class org.apache.ws.security.handler.WSHandler

getProperty

public java.lang.Object getProperty(java.lang.Object msgContext,
                                    java.lang.String key)
Specified by:
getProperty in class org.apache.ws.security.handler.WSHandler

setHandler

public void setHandler(javax.security.auth.callback.CallbackHandler handler)

setPassword

public void setPassword(java.lang.Object msgContext,
                        java.lang.String password)
Specified by:
setPassword in class org.apache.ws.security.handler.WSHandler

setProperty

public void setProperty(java.lang.Object msgContext,
                        java.lang.String key,
                        java.lang.Object value)
Specified by:
setProperty in class org.apache.ws.security.handler.WSHandler

loadDecryptionCrypto

protected org.apache.ws.security.components.crypto.Crypto loadDecryptionCrypto(org.apache.ws.security.handler.RequestData reqData)
                                                                        throws org.apache.ws.security.WSSecurityException
Overrides:
loadDecryptionCrypto in class org.apache.ws.security.handler.WSHandler
Throws:
org.apache.ws.security.WSSecurityException

loadEncryptionCrypto

protected org.apache.ws.security.components.crypto.Crypto loadEncryptionCrypto(org.apache.ws.security.handler.RequestData reqData)
                                                                        throws org.apache.ws.security.WSSecurityException
Overrides:
loadEncryptionCrypto in class org.apache.ws.security.handler.WSHandler
Throws:
org.apache.ws.security.WSSecurityException

loadSignatureCrypto

public org.apache.ws.security.components.crypto.Crypto loadSignatureCrypto(org.apache.ws.security.handler.RequestData reqData)
                                                                    throws org.apache.ws.security.WSSecurityException
Overrides:
loadSignatureCrypto in class org.apache.ws.security.handler.WSHandler
Throws:
org.apache.ws.security.WSSecurityException

onReceive

public void onReceive(Context context)
               throws java.lang.Exception
Specified by:
onReceive in interface Handler
Throws:
java.lang.Exception

onReply

public void onReply(Context context)
             throws java.lang.Exception
Specified by:
onReply in interface Handler
Throws:
java.lang.Exception

onFault

public void onFault(Context context)
             throws java.lang.Exception
Specified by:
onFault in interface Handler
Throws:
java.lang.Exception

onSend

public void onSend(Context context)
            throws java.lang.Exception
Specified by:
onSend in interface Handler
Throws:
java.lang.Exception

onAnswer

public void onAnswer(Context context)
Specified by:
onAnswer in interface Handler

checkUser

protected void checkUser(java.lang.String user,
                         java.lang.Object credentials)
                  throws java.security.GeneralSecurityException
Throws:
java.security.GeneralSecurityException

getKeystore

public java.lang.String getKeystore()
Returns:
the keystore

setKeystore

public void setKeystore(java.lang.String keystore)
Parameters:
keystore - the keystore to set

init

protected void init(Context context)


Copyright © 2005-2011 FuseSource. All Rights Reserved.