Class NavigationHelper
java.lang.Object
com.atlassian.crowd.integration.springsecurity.NavigationHelper
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
calculateSafeNextUrlForRedirect
(Supplier<String> nextUrlSupplier, String defaultLocation, Function<String, String> contextPathMapper) Calculates next url based on "next" request parameterprotected static boolean
isLocalPath
(URI uri) requestParamNextUrlSupplier
(javax.servlet.http.HttpServletRequest request) safeUrlForRedirect
(String url) withContextPath
(javax.servlet.http.HttpServletRequest httpServletRequest)
-
Field Details
-
NEXT_URL_PARAMETER_NAME
- See Also:
-
-
Constructor Details
-
NavigationHelper
public NavigationHelper()
-
-
Method Details
-
calculateSafeNextUrlForRedirect
public static String calculateSafeNextUrlForRedirect(Supplier<String> nextUrlSupplier, String defaultLocation, Function<String, String> contextPathMapper) Calculates next url based on "next" request parameter- Parameters:
nextUrlSupplier
- supply the next url to calculatedefaultLocation
- default location which will be used if next url cannot be calculatedcontextPathMapper
- function to map context path on the calculated url- Returns:
- calculated next url which is URL safe
-
requestParamNextUrlSupplier
-
withContextPath
-
withoutContextPath
-
safeUrlForRedirect
-
isLocalPath
-