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

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

public class XmlSecOutInterceptor
extends Object
implements org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.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()
           
 Collection<org.apache.cxf.phase.PhaseInterceptor<? extends org.apache.cxf.message.Message>> getAdditionalInterceptors()
           
 Set<String> getAfter()
           
 Set<String> getBefore()
           
 String getId()
           
 String getPhase()
           
 SecretKey getSymmetricKey()
           
 void handleFault(org.apache.cxf.message.Message message)
           
 void handleMessage(org.apache.cxf.message.Message message)
           
 boolean isEncryptRequest()
           
 boolean isEncryptSymmetricKey()
           
 boolean isSignRequest()
           
 void setAfter(Set<String> after)
           
 void setBefore(Set<String> before)
           
 void setElementsToEncrypt(List<QName> elementsToEncrypt)
           
 void setElementsToSign(List<QName> elementsToSign)
           
 void setEncryptionDigestAlgorithm(String algo)
           
 void setEncryptionProperties(EncryptionProperties properties)
           
 void setEncryptRequest(boolean encryptRequest)
           
 void setEncryptSymmetricKey(boolean encryptSymmetricKey)
           
 void setKeyEncAlgorithm(String algo)
           
 void setKeyIdentifierType(String type)
           
 void setKeyInfoMustBeAvailable(boolean use)
           
 void setPhase(String phase)
           
 void setSignatureAlgorithm(String algo)
           
 void setSignatureDigestAlgorithm(String algo)
           
 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 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

handleFault

public void handleFault(org.apache.cxf.message.Message message)
Specified by:
handleFault in interface org.apache.cxf.interceptor.Interceptor<org.apache.cxf.message.Message>

handleMessage

public void handleMessage(org.apache.cxf.message.Message message)
                   throws org.apache.cxf.interceptor.Fault
Specified by:
handleMessage in interface org.apache.cxf.interceptor.Interceptor<org.apache.cxf.message.Message>
Throws:
org.apache.cxf.interceptor.Fault

throwFault

protected void throwFault(String error,
                          Exception ex)

getAdditionalInterceptors

public Collection<org.apache.cxf.phase.PhaseInterceptor<? extends org.apache.cxf.message.Message>> getAdditionalInterceptors()
Specified by:
getAdditionalInterceptors in interface org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.Message>

getAfter

public Set<String> getAfter()
Specified by:
getAfter in interface org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.Message>

setAfter

public void setAfter(Set<String> after)

getBefore

public Set<String> getBefore()
Specified by:
getBefore in interface org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.Message>

setBefore

public void setBefore(Set<String> before)

getId

public String getId()
Specified by:
getId in interface org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.Message>

getPhase

public String getPhase()
Specified by:
getPhase in interface org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.Message>

setPhase

public void setPhase(String phase)

setEncryptionProperties

public void setEncryptionProperties(EncryptionProperties properties)

setKeyIdentifierType

public void setKeyIdentifierType(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)

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