Package org.apache.cxf.ws.security.wss4j
Class AbstractWSS4JStaxInterceptor
java.lang.Object
org.apache.cxf.ws.security.wss4j.AbstractWSS4JStaxInterceptor
- All Implemented Interfaces:
SoapInterceptor,Interceptor<SoapMessage>,PhaseInterceptor<SoapMessage>
- Direct Known Subclasses:
WSS4JStaxInInterceptor,WSS4JStaxOutInterceptor
public abstract class AbstractWSS4JStaxInterceptor
extends Object
implements SoapInterceptor, PhaseInterceptor<SoapMessage>
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractWSS4JStaxInterceptor(Map<String, Object> properties) AbstractWSS4JStaxInterceptor(org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureCallbackHandler(SoapMessage soapMessage, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) protected org.apache.wss4j.stax.ext.WSSSecurityPropertiesCollection<PhaseInterceptor<? extends Message>>Returns a collection of Interceptors that should be added to the chain whenever this interceptor is added.getAfter()Returns a set containing the IDs of the interceptors that should be executed before this interceptor.Returns a set containing the IDs of the interceptors that should be executed after this interceptor.protected org.apache.wss4j.common.crypto.CryptogetEncryptionCrypto(Object e, SoapMessage message, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) getId()Returns the ID of this interceptor.protected StringgetPassword(Object msgContext) protected org.apache.wss4j.common.crypto.PasswordEncryptorgetPasswordEncryptor(SoapMessage soapMessage, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) getPhase()Returns the phase in which this interceptor is excecuted.getProperty(Object msgContext, String key) getRoles()protected org.apache.wss4j.common.crypto.CryptogetSignatureCrypto(Object s, SoapMessage message, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) voidhandleFault(SoapMessage message) Called for all interceptors (in reverse order) on which handleMessage had been successfully invoked, when normal execution of the chain was aborted for some reason.protected booleanisRequestor(SoapMessage message) protected org.apache.wss4j.common.crypto.CryptoloadCrypto(SoapMessage soapMessage, String cryptoPropertyFile, String cryptoPropertyRefId, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) Load a Crypto instance.protected org.apache.wss4j.common.crypto.CryptoloadCryptoFromPropertiesFile(SoapMessage soapMessage, String propFilename, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) voidpostHandleMessage(SoapMessage message) voidvoidsetPassword(Object msgContext, String password) voidvoidsetProperty(Object msgContext, String key, Object value) protected voidtranslateProperties(SoapMessage msg, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cxf.interceptor.Interceptor
handleMessage
-
Constructor Details
-
AbstractWSS4JStaxInterceptor
public AbstractWSS4JStaxInterceptor(org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) -
AbstractWSS4JStaxInterceptor
-
AbstractWSS4JStaxInterceptor
public AbstractWSS4JStaxInterceptor()
-
-
Method Details
-
createSecurityProperties
protected org.apache.wss4j.stax.ext.WSSSecurityProperties createSecurityProperties() -
translateProperties
protected void translateProperties(SoapMessage msg, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) -
configureCallbackHandler
protected void configureCallbackHandler(SoapMessage soapMessage, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) throws org.apache.wss4j.common.ext.WSSecurityException - Throws:
org.apache.wss4j.common.ext.WSSecurityException
-
getPassword
-
getRoles
- Specified by:
getRolesin interfaceSoapInterceptor
-
handleFault
Description copied from interface:InterceptorCalled for all interceptors (in reverse order) on which handleMessage had been successfully invoked, when normal execution of the chain was aborted for some reason.- Specified by:
handleFaultin interfaceInterceptor<SoapMessage>
-
postHandleMessage
- Throws:
Fault
-
getAdditionalInterceptors
Description copied from interface:PhaseInterceptorReturns a collection of Interceptors that should be added to the chain whenever this interceptor is added. May return null.- Specified by:
getAdditionalInterceptorsin interfacePhaseInterceptor<SoapMessage>- Returns:
- the collection of interceptors
-
getPhase
Description copied from interface:PhaseInterceptorReturns the phase in which this interceptor is excecuted.- Specified by:
getPhasein interfacePhaseInterceptor<SoapMessage>- Returns:
- the phase
-
setPhase
-
getOption
-
getProperty
-
setPassword
-
setProperty
-
getId
Description copied from interface:PhaseInterceptorReturns the ID of this interceptor.- Specified by:
getIdin interfacePhaseInterceptor<SoapMessage>- Returns:
- the ID
-
setId
-
getUnderstoodHeaders
- Specified by:
getUnderstoodHeadersin interfaceSoapInterceptor
-
getProperties
-
getAfter
Description copied from interface:PhaseInterceptorReturns a set containing the IDs of the interceptors that should be executed before this interceptor. This interceptor will be placed in the chain after the interceptors in the set.- Specified by:
getAfterin interfacePhaseInterceptor<SoapMessage>- Returns:
- the IDs of the interceptors
-
getBefore
Description copied from interface:PhaseInterceptorReturns a set containing the IDs of the interceptors that should be executed after this interceptor. This interceptor will be placed in the inteceptor chain before the interceptors in the set.- Specified by:
getBeforein interfacePhaseInterceptor<SoapMessage>- Returns:
- the ids of the interceptors
-
isRequestor
-
loadCrypto
protected org.apache.wss4j.common.crypto.Crypto loadCrypto(SoapMessage soapMessage, String cryptoPropertyFile, String cryptoPropertyRefId, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) throws org.apache.wss4j.common.ext.WSSecurityException Load a Crypto instance. Firstly, it tries to use the cryptoPropertyRefId tag to retrieve a Crypto object via a custom reference Id. Failing this, it tries to load the crypto instance via the cryptoPropertyFile tag.- Throws:
org.apache.wss4j.common.ext.WSSecurityException
-
loadCryptoFromPropertiesFile
protected org.apache.wss4j.common.crypto.Crypto loadCryptoFromPropertiesFile(SoapMessage soapMessage, String propFilename, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) throws org.apache.wss4j.common.ext.WSSecurityException - Throws:
org.apache.wss4j.common.ext.WSSecurityException
-
getPasswordEncryptor
protected org.apache.wss4j.common.crypto.PasswordEncryptor getPasswordEncryptor(SoapMessage soapMessage, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) -
getEncryptionCrypto
protected org.apache.wss4j.common.crypto.Crypto getEncryptionCrypto(Object e, SoapMessage message, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) throws org.apache.wss4j.common.ext.WSSecurityException - Throws:
org.apache.wss4j.common.ext.WSSecurityException
-
getSignatureCrypto
protected org.apache.wss4j.common.crypto.Crypto getSignatureCrypto(Object s, SoapMessage message, org.apache.wss4j.stax.ext.WSSSecurityProperties securityProperties) throws org.apache.wss4j.common.ext.WSSecurityException - Throws:
org.apache.wss4j.common.ext.WSSecurityException
-