Class VerifiyBackUrlUtils
java.lang.Object
fr.paris.lutece.plugins.verifybackurl.utils.VerifiyBackUrlUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final fr.paris.lutece.util.http.AntPathMatcher -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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(jakarta.servlet.http.HttpServletRequest request, String strSessionAttributeName) Drop Service in sessionstatic Stringencode url in base64static StringgetBackUrlInSession(jakarta.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(jakarta.servlet.http.HttpServletRequest request, String strBackUrl, String strSessionAttributeName) Store service in session
-
Field Details
-
PATH_MATCHER
public static final fr.paris.lutece.util.http.AntPathMatcher PATH_MATCHER
-
-
Constructor Details
-
VerifiyBackUrlUtils
public VerifiyBackUrlUtils()
-
-
Method Details
-
isValidBackUrl
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
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
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
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
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 HttpServletRequeststrBackUrl- the backUrl to store in sessionstrSessionAttributeName- 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 HttpServletrequeststrSessionAttributeName- 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 backurlrequest- the HttpServletRequest
-
encodeUrl
encode url in base64- Parameters:
strUrl- the url to encode- Returns:
- an url encode in base64
-