Class FSSOAPReceiver

  • All Implemented Interfaces:
    jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

    public class FSSOAPReceiver
    extends jakarta.servlet.http.HttpServlet
    SOAP endpoint that handles federation SOAP request.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      FSSOAPReceiver()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doPost​(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Handles post request.
      void init​(jakarta.servlet.ServletConfig config)
      Initializes the servlet.
      void onMessage​(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.xml.soap.SOAPMessage message)
      Process the request.
      protected jakarta.xml.soap.SOAPMessage signResponse​(jakarta.xml.soap.SOAPMessage msg, String idAttrName, String id, com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig)
      Signs SOAP Response before sending it to the provider.
      protected boolean verifyRequestSignature​(Element elt, jakarta.xml.soap.SOAPMessage msg, X509Certificate cert)
      Verifies the signature on the request received from a remote trusted provider.
      • Methods inherited from class jakarta.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class jakarta.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
    • Constructor Detail

      • FSSOAPReceiver

        public FSSOAPReceiver()
        Default constructor.
    • Method Detail

      • init

        public void init​(jakarta.servlet.ServletConfig config)
                  throws jakarta.servlet.ServletException
        Initializes the servlet.
        Specified by:
        init in interface jakarta.servlet.Servlet
        Overrides:
        init in class jakarta.servlet.GenericServlet
        Parameters:
        config - ServletConfig object
        Throws:
        jakarta.servlet.ServletException - if error occurrs
      • doPost

        public void doPost​(jakarta.servlet.http.HttpServletRequest request,
                           jakarta.servlet.http.HttpServletResponse response)
                    throws jakarta.servlet.ServletException,
                           IOException
        Handles post request.
        Overrides:
        doPost in class jakarta.servlet.http.HttpServlet
        Parameters:
        request - http request object
        response - http response object
        Throws:
        jakarta.servlet.ServletException
        IOException
      • onMessage

        public void onMessage​(jakarta.servlet.http.HttpServletRequest request,
                              jakarta.servlet.http.HttpServletResponse response,
                              jakarta.xml.soap.SOAPMessage message)
        Process the request.
        Parameters:
        request - http request object
        response - http response object
        message - received soap message
      • verifyRequestSignature

        protected boolean verifyRequestSignature​(Element elt,
                                                 jakarta.xml.soap.SOAPMessage msg,
                                                 X509Certificate cert)
        Verifies the signature on the request received from a remote trusted provider.
        Parameters:
        elt - containing the logout request in the XML message
        msg - request soap message
        cert - Certificate to be used in verifying the signature.
        Returns:
        boolean true if signature verfication successful; otherwise return false.
      • signResponse

        protected jakarta.xml.soap.SOAPMessage signResponse​(jakarta.xml.soap.SOAPMessage msg,
                                                            String idAttrName,
                                                            String id,
                                                            com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig)
                                                     throws SAMLException,
                                                            FSMsgException
        Signs SOAP Response before sending it to the provider.
        Parameters:
        msg - the response message to be sent to provider
        idAttrName - name of the id attribute to be signed
        id - the value of the id attributer to be signed
        hostedConfig - hosted provider's extended meta
        Returns:
        SOAPMessage the signed response message
        Throws:
        SAMLException
        FSMsgException