Class XmlSecInInterceptor

java.lang.Object
org.apache.cxf.phase.AbstractPhaseInterceptor<Message>
org.apache.cxf.rs.security.xml.XmlSecInInterceptor
All Implemented Interfaces:
jakarta.ws.rs.ext.ReaderInterceptor, Interceptor<Message>, PhaseInterceptor<Message>

public class XmlSecInInterceptor extends AbstractPhaseInterceptor<Message> implements jakarta.ws.rs.ext.ReaderInterceptor
A new StAX-based interceptor for processing messages with XML Signature + Encryption content.
  • Constructor Details

    • XmlSecInInterceptor

      public XmlSecInInterceptor()
  • Method Details

    • 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.
      Specified by:
      handleMessage in interface Interceptor<Message>
      Throws:
      Fault
    • configureSecurityEventListener

      protected org.apache.xml.security.stax.securityEvent.SecurityEventListener configureSecurityEventListener(org.apache.wss4j.common.crypto.Crypto sigCrypto, Message msg, org.apache.xml.security.stax.ext.XMLSecurityProperties securityProperties)
    • throwFault

      protected void throwFault(String error, Exception ex)
    • setEncryptionProperties

      public void setEncryptionProperties(EncryptionProperties properties)
    • setSignatureProperties

      public void setSignatureProperties(SignatureProperties properties)
    • getDecryptionAlias

      public String getDecryptionAlias()
    • setDecryptionAlias

      public void setDecryptionAlias(String decryptionAlias)
    • getSignatureVerificationAlias

      public String getSignatureVerificationAlias()
    • setSignatureVerificationAlias

      public void setSignatureVerificationAlias(String signatureVerificationAlias)
    • setPersistSignature

      public void setPersistSignature(boolean persist)
    • isRequireSignature

      public boolean isRequireSignature()
    • setRequireSignature

      public void setRequireSignature(boolean requireSignature)
    • isRequireEncryption

      public boolean isRequireEncryption()
    • setRequireEncryption

      public void setRequireEncryption(boolean requireEncryption)
    • setSubjectConstraints

      public void setSubjectConstraints(List<String> constraints)
      Set a list of Strings corresponding to regular expression constraints on the subject DN of a certificate
    • aroundReadFrom

      public Object aroundReadFrom(jakarta.ws.rs.ext.ReaderInterceptorContext ctx) throws IOException, jakarta.ws.rs.WebApplicationException
      Specified by:
      aroundReadFrom in interface jakarta.ws.rs.ext.ReaderInterceptor
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException