Class VerifiyBackUrlUtils
- java.lang.Object
-
- fr.paris.lutece.plugins.verifybackurl.utils.VerifiyBackUrlUtils
-
public class VerifiyBackUrlUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static org.springframework.util.PathMatcherPATH_MATCHER
-
Constructor Summary
Constructors Constructor Description VerifiyBackUrlUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancompareBaseUrl(String url1, String url2)Compare to base urlstatic booleancontainsNoUnauthorizedHTML(String strBackUrl)Test if the BacUrl is a valid urlstatic booleancontainsUnauthorizedCharactersDomain(String strBackUrl)Test if the BackUrl is a valid urlstatic voiddropBackUrlInSession(javax.servlet.http.HttpServletRequest request, String strSessionAttributeName)Drop Service in sessionstatic StringgetBackUrlInSession(javax.servlet.http.HttpServletRequest request, String strSessionAttributeName)Return the back url in sessionstatic StringgetBaseUrl(String strUrl)Get base url for input Url : http://site.paris.mdp/webapp/jsp ==> site.paris.mdp/webappstatic booleanisValidBackUrl(String strBackUrl)Test if the BacUrl is a valid urlstatic voidstoreBackUrlInSession(javax.servlet.http.HttpServletRequest request, String strBackUrl, String strSessionAttributeName)Store service in session
-
-
-
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 HttpServletRequeststrBackUrl- the backUrl to store in sessionstrSessionAttributeName- 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 HttpServletrequeststrSessionAttributeName- the strSessionAttributeName who must store the backurl
-
-