Class VerifiyBackUrlUtils


  • public class VerifiyBackUrlUtils
    extends Object
    • Field Detail

      • PATH_MATCHER

        public static final org.springframework.util.PathMatcher PATH_MATCHER
    • Constructor Detail

      • VerifiyBackUrlUtils

        public VerifiyBackUrlUtils()
    • Method Detail

      • isValidBackUrl

        public static boolean isValidBackUrl​(String strBackUrl)
        Test if the BacUrl is a valid url
        Parameters:
        strBackUrl - the back url to test
        Returns:
        Test if the BackUrl is a valid url
      • containsNoUnauthorizedHTML

        public static boolean containsNoUnauthorizedHTML​(String strBackUrl)
        Test if the BacUrl is a valid url
        Parameters:
        strBackUrl - the back url to test
        Returns:
        Test if the BackUrl is a valid url
      • containsUnauthorizedCharactersDomain

        public static boolean containsUnauthorizedCharactersDomain​(String strBackUrl)
        Test if the BackUrl is a valid url
        Parameters:
        strBackUrl - the back url to test
        Returns:
        Test if the BackUrl is a valid url
      • compareBaseUrl

        public static boolean compareBaseUrl​(String url1,
                                             String url2)
        Compare to base url
        Parameters:
        url1 -
        url2 -
        Returns:
        a boolean if base url of the two input Strings are the same an no empty.
      • getBaseUrl

        public static String getBaseUrl​(String strUrl)
        Get base url for input Url : http://site.paris.mdp/webapp/jsp ==> site.paris.mdp/webapp
        Parameters:
        strUrl -
        Returns:
        the base Url
      • storeBackUrlInSession

        public static void storeBackUrlInSession​(javax.servlet.http.HttpServletRequest request,
                                                 String strBackUrl,
                                                 String strSessionAttributeName)
        Store service in session
        Parameters:
        request - the HttpServletRequest
        strBackUrl - the backUrl to store in session
        strSessionAttributeName - the strSessionAttributeName who must store the backurl
      • dropBackUrlInSession

        public static void dropBackUrlInSession​(javax.servlet.http.HttpServletRequest request,
                                                String strSessionAttributeName)
        Drop Service in session
        Parameters:
        request - the HttpServletrequest
        strSessionAttributeName - the strSessionAttributeName who must store the backurl
      • getBackUrlInSession

        public static String getBackUrlInSession​(javax.servlet.http.HttpServletRequest request,
                                                 String strSessionAttributeName)
        Return the back url in session
        Parameters:
        strSessionAttributeName - the strSessionAttributeName who must store the backurl
        request - the HttpServletRequest