Class VerifiyBackUrlUtils

java.lang.Object
fr.paris.lutece.plugins.verifybackurl.utils.VerifiyBackUrlUtils

public class VerifiyBackUrlUtils extends Object
  • Field Details

    • PATH_MATCHER

      public static final fr.paris.lutece.util.http.AntPathMatcher PATH_MATCHER
  • Constructor Details

    • VerifiyBackUrlUtils

      public VerifiyBackUrlUtils()
  • Method Details

    • 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(jakarta.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(jakarta.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(jakarta.servlet.http.HttpServletRequest request, String strSessionAttributeName)
      Return the back url in session
      Parameters:
      strSessionAttributeName - the strSessionAttributeName who must store the backurl
      request - the HttpServletRequest
    • encodeUrl

      public static String encodeUrl(String strUrl)
      encode url in base64
      Parameters:
      strUrl - the url to encode
      Returns:
      an url encode in base64