Class NavigationHelper

java.lang.Object
com.atlassian.crowd.integration.springsecurity.NavigationHelper

public class NavigationHelper extends Object
  • Field Details

  • 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 calculate
      defaultLocation - default location which will be used if next url cannot be calculated
      contextPathMapper - function to map context path on the calculated url
      Returns:
      calculated next url which is URL safe
    • requestParamNextUrlSupplier

      public static Supplier<String> requestParamNextUrlSupplier(javax.servlet.http.HttpServletRequest request)
    • withContextPath

      public static Function<String,String> withContextPath(javax.servlet.http.HttpServletRequest httpServletRequest)
    • withoutContextPath

      public static Function<String,String> withoutContextPath()
    • safeUrlForRedirect

      public static Optional<String> safeUrlForRedirect(String url)
    • isLocalPath

      protected static boolean isLocalPath(URI uri)