Class SessionUtils

java.lang.Object
com.atlassian.bamboo.session.SessionUtils

public final class SessionUtils extends Object
  • Field Details

  • Constructor Details

    • SessionUtils

      public SessionUtils()
  • Method Details

    • shouldUpdateLastAccessTime

      public static boolean shouldUpdateLastAccessTime(@NotNull @NotNull javax.servlet.http.HttpServletRequest request)
      Determines whether the last access time of the session should be updated based on the request.

      This method checks the request headers and the request path to decide if the timestamp e.g., the session's last access time should be updated. It first checks for the presence of a specific header (`USER_ACTION_HEADER`). If the header is not present or is empty, it checks if the request path and method are blacklisted. If the request path and method are blacklisted, the last access time should not be updated. If the header is present and its value is "false", the last access time should also not be updated.

      Parameters:
      request - the HTTP servlet request
      Returns:
      true if the last access time should be updated, false otherwise