Class CustomEndpointInterceptor

java.lang.Object
swiss.trustbroker.wstrust.service.CustomEndpointInterceptor
All Implemented Interfaces:
org.springframework.ws.server.EndpointInterceptor, org.springframework.ws.soap.server.SoapEndpointInterceptor

public class CustomEndpointInterceptor extends Object implements org.springframework.ws.soap.server.SoapEndpointInterceptor
Interceptor handles the SOAP header and extracts the SAML assertion from it to treat it the SAML POST way. We translate the DOM element into an opensaml representation here which asserts that the DOM stack is consistent i.e. we do not get a mess with these implementation variants: - com.sun.xml.messaging.saaj.soap.impl.ElementImpl - com.sun.org.apache.xerces.internal.dom.ElementNSImpl
  • Constructor Details

    • CustomEndpointInterceptor

      public CustomEndpointInterceptor(swiss.trustbroker.config.TrustBrokerProperties trustBrokerProperties, Transformer transformer)
  • Method Details

    • understands

      public boolean understands(org.springframework.ws.soap.SoapHeaderElement header)
      Specified by:
      understands in interface org.springframework.ws.soap.server.SoapEndpointInterceptor
    • handleRequest

      public boolean handleRequest(org.springframework.ws.context.MessageContext messageContext, Object endpoint)
      Specified by:
      handleRequest in interface org.springframework.ws.server.EndpointInterceptor
    • unmarshallElement

      public static org.opensaml.core.xml.XMLObject unmarshallElement(Element samlElement)
    • handleResponse

      public boolean handleResponse(org.springframework.ws.context.MessageContext messageContext, Object endpoint) throws Exception
      Specified by:
      handleResponse in interface org.springframework.ws.server.EndpointInterceptor
      Throws:
      Exception
    • handleFault

      public boolean handleFault(org.springframework.ws.context.MessageContext messageContext, Object endpoint)
      Specified by:
      handleFault in interface org.springframework.ws.server.EndpointInterceptor
    • afterCompletion

      public void afterCompletion(org.springframework.ws.context.MessageContext messageContext, Object endpoint, Exception ex)
      Specified by:
      afterCompletion in interface org.springframework.ws.server.EndpointInterceptor
    • createActionHeader

      public static org.opensaml.soap.wsaddressing.Action createActionHeader()
    • createEnvRelatesToHeader

      public static org.opensaml.soap.wsaddressing.RelatesTo createEnvRelatesToHeader()