Class DoManageNameID


  • public class DoManageNameID
    extends Object
    This class reads the query parameters and the required processing logic for sending ManageNameIDRequest from SP to IDP.
    • Constructor Detail

      • DoManageNameID

        public DoManageNameID()
    • Method Detail

      • initiateManageNameIDRequest

        public static void initiateManageNameIDRequest​(jakarta.servlet.http.HttpServletRequest request,
                                                       jakarta.servlet.http.HttpServletResponse response,
                                                       String metaAlias,
                                                       String remoteEntityID,
                                                       Map paramsMap)
                                                throws SAML2Exception
        Parses the request parameters and builds the ManageNameID Request to sent to remote Entity.
        Parameters:
        request - the HttpServletRequest.
        response - the HttpServletResponse.
        metaAlias - entityID of hosted entity.
        remoteEntityID - entityID of remote entity.
        paramsMap - Map of all other parameters.
        Throws:
        SAML2Exception - if error initiating request to remote entity.
      • getMNIBindingInfo

        public static String getMNIBindingInfo​(jakarta.servlet.http.HttpServletRequest request,
                                               String metaAlias,
                                               String hostEntityRole,
                                               String remoteEntityID)
                                        throws SAML2Exception
        Returns binding information of MNI Service for remote entity from request or meta configuration.
        Parameters:
        request - the HttpServletRequest.
        metaAlias - entityID of hosted entity.
        hostEntityRole - Role of hosted entity.
        remoteEntityID - entityID of remote entity.
        Returns:
        return true if the processing is successful.
        Throws:
        SAML2Exception - if no binding information is configured.
      • processHttpRequest

        public static void processHttpRequest​(jakarta.servlet.http.HttpServletRequest request,
                                              jakarta.servlet.http.HttpServletResponse response,
                                              Map paramsMap)
                                       throws SAML2Exception,
                                              SessionException,
                                              jakarta.servlet.ServletException
        Parses the request parameters and process the ManageNameID Request from the remote entity.
        Parameters:
        request - the HttpServletRequest.
        response - the HttpServletResponse.
        paramsMap - Map of all other parameters.
        Throws:
        SAML2Exception - if error occurred while processing the request.
        SessionException - if error processing the request from remote entity.
        jakarta.servlet.ServletException - if request length is invalid.
      • processSOAPRequest

        public static void processSOAPRequest​(jakarta.servlet.http.HttpServletRequest request,
                                              jakarta.servlet.http.HttpServletResponse response,
                                              Map paramsMap)
                                       throws SAML2Exception,
                                              IOException,
                                              jakarta.xml.soap.SOAPException,
                                              jakarta.servlet.ServletException
        Parses the request parameters and process the ManageNameID Request from the remote entity.
        Parameters:
        request - the HttpServletRequest.
        response - the HttpServletResponse.
        paramsMap - Map of all other parameters.
        Throws:
        SAML2Exception - if error occurred while processing the request.
        IOException - if error generation DOM from input stream.
        jakarta.xml.soap.SOAPException - if error generating soap message.
        jakarta.servlet.ServletException - if request length is invalid.
      • processManageNameIDResponse

        public static boolean processManageNameIDResponse​(jakarta.servlet.http.HttpServletRequest request,
                                                          jakarta.servlet.http.HttpServletResponse response,
                                                          Map paramsMap)
                                                   throws SAML2Exception
        Parses the request parameters and builds the Authentication Request to sent to the IDP.
        Parameters:
        request - the HttpServletRequest.
        response - the HttpServletResponse.
        paramsMap - Map of all other parameters.
        Returns:
        return true if the processing is successful.
        Throws:
        SAML2Exception - if error initiating request to IDP.
      • getIDPManageNameIDConfig

        public static ManageNameIDServiceElement getIDPManageNameIDConfig​(String realm,
                                                                          String entityId,
                                                                          String binding)
                                                                   throws SAML2MetaException,
                                                                          SessionException
        Returns first ManageNameID configuration in an entity under the realm.
        Parameters:
        realm - The realm under which the entity resides.
        entityId - ID of the entity to be retrieved.
        binding - bind type need to has to be matched.
        Returns:
        ManageNameIDServiceElement for the entity or null
        Throws:
        SAML2MetaException - if unable to retrieve the first identity provider's SSO configuration.
        SessionException - invalid or expired single-sign-on session
      • getSPManageNameIDConfig

        public static ManageNameIDServiceElement getSPManageNameIDConfig​(String realm,
                                                                         String entityId,
                                                                         String binding)
                                                                  throws SAML2MetaException,
                                                                         SessionException
        Returns first ManageNameID configuration in an entity under the realm.
        Parameters:
        realm - The realm under which the entity resides.
        entityId - ID of the entity to be retrieved.
        binding - bind type need to has to be matched.
        Returns:
        ManageNameIDServiceElement for the entity or null
        Throws:
        SAML2MetaException - if unable to retrieve the first identity provider's SSO configuration.
        SessionException - invalid or expired single-sign-on session.
      • processMNIResponsePOST

        public static boolean processMNIResponsePOST​(jakarta.servlet.http.HttpServletRequest request,
                                                     jakarta.servlet.http.HttpServletResponse response,
                                                     Map paramsMap)
                                              throws SAML2Exception
        Throws:
        SAML2Exception