Apache CXF API

org.apache.cxf.rs.security.xml
Class XmlSecOutInterceptor

java.lang.Object
  extended by org.apache.cxf.phase.AbstractPhaseInterceptor<Message>
      extended by org.apache.cxf.rs.security.xml.XmlSecOutInterceptor
All Implemented Interfaces:
Interceptor<Message>, PhaseInterceptor<Message>

public class XmlSecOutInterceptor
extends AbstractPhaseInterceptor<Message>

A new StAX-based interceptor for creating messages with XML Signature + Encryption content.


Field Summary
static String OUTPUT_STREAM_HOLDER
           
 
Constructor Summary
XmlSecOutInterceptor()
           
 
Method Summary
 void addElementToEncrypt(QName elementToEncrypt)
           
 void addElementToSign(QName elementToSign)
           
 org.apache.cxf.rs.security.xml.XmlSecOutInterceptor.XmlSecStaxOutInterceptorInternal createEndingInterceptor()
           
 SecretKey getSymmetricKey()
           
 void handleMessage(Message message)
          Intercepts a message.
 boolean isEncryptRequest()
           
 boolean isEncryptSymmetricKey()
           
 boolean isSignRequest()
           
 void setElementsToEncrypt(List<QName> elementsToEncrypt)
           
 void setElementsToSign(List<QName> elementsToSign)
           
 void setEncryptionDigestAlgorithm(String algo)
           
 void setEncryptionKeyIdentifierType(String type)
           
 void setEncryptionProperties(EncryptionProperties properties)
           
 void setEncryptRequest(boolean encryptRequest)
           
 void setEncryptSymmetricKey(boolean encryptSymmetricKey)
           
 void setKeyEncAlgorithm(String algo)
           
 void setKeyInfoMustBeAvailable(boolean use)
           
 void setSignatureAlgorithm(String algo)
           
 void setSignatureDigestAlgorithm(String algo)
           
 void setSignatureKeyIdentifierType(String type)
           
 void setSignatureProperties(SignatureProperties props)
           
 void setSignRequest(boolean signRequest)
           
 void setSymmetricEncAlgorithm(String algo)
           
 void setSymmetricKey(SecretKey symmetricKey)
           
protected  void throwFault(String error, Exception ex)
           
 
Methods inherited from class org.apache.cxf.phase.AbstractPhaseInterceptor
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUT_STREAM_HOLDER

public static final String OUTPUT_STREAM_HOLDER
Constructor Detail

XmlSecOutInterceptor

public XmlSecOutInterceptor()
Method Detail

handleMessage

public void handleMessage(Message message)
                   throws Fault
Description copied from interface: Interceptor
Intercepts a message. Interceptors should NOT invoke handleMessage or handleFault on the next interceptor - the interceptor chain will take care of this.

Throws:
Fault

throwFault

protected void throwFault(String error,
                          Exception ex)

setEncryptionProperties

public void setEncryptionProperties(EncryptionProperties properties)

setEncryptionKeyIdentifierType

public void setEncryptionKeyIdentifierType(String type)

setSymmetricEncAlgorithm

public void setSymmetricEncAlgorithm(String algo)

setKeyEncAlgorithm

public void setKeyEncAlgorithm(String algo)

setEncryptionDigestAlgorithm

public void setEncryptionDigestAlgorithm(String algo)

setKeyInfoMustBeAvailable

public void setKeyInfoMustBeAvailable(boolean use)

setSignatureProperties

public void setSignatureProperties(SignatureProperties props)

setSignatureAlgorithm

public void setSignatureAlgorithm(String algo)

setSignatureDigestAlgorithm

public void setSignatureDigestAlgorithm(String algo)

setSignatureKeyIdentifierType

public void setSignatureKeyIdentifierType(String type)

createEndingInterceptor

public final org.apache.cxf.rs.security.xml.XmlSecOutInterceptor.XmlSecStaxOutInterceptorInternal createEndingInterceptor()

isSignRequest

public boolean isSignRequest()

setSignRequest

public void setSignRequest(boolean signRequest)

isEncryptRequest

public boolean isEncryptRequest()

setEncryptRequest

public void setEncryptRequest(boolean encryptRequest)

setElementsToEncrypt

public void setElementsToEncrypt(List<QName> elementsToEncrypt)

addElementToEncrypt

public void addElementToEncrypt(QName elementToEncrypt)

setElementsToSign

public void setElementsToSign(List<QName> elementsToSign)

addElementToSign

public void addElementToSign(QName elementToSign)

isEncryptSymmetricKey

public boolean isEncryptSymmetricKey()

setEncryptSymmetricKey

public void setEncryptSymmetricKey(boolean encryptSymmetricKey)

getSymmetricKey

public SecretKey getSymmetricKey()

setSymmetricKey

public void setSymmetricKey(SecretKey symmetricKey)

Apache CXF API

Apache CXF