Class SeraphUtils

java.lang.Object
com.atlassian.confluence.util.SeraphUtils

public class SeraphUtils extends Object
  • Constructor Details

    • SeraphUtils

      public SeraphUtils()
  • Method Details

    • getLoginURL

      public static String getLoginURL(javax.servlet.http.HttpServletRequest request)
    • getLinkLoginURL

      public static String getLinkLoginURL(javax.servlet.http.HttpServletRequest request, String username)
      Get a login URL and append the given username so that it can be filled into the form if default login mechanism is used.
      Parameters:
      request -
      username -
      Returns:
      the url
      See Also:
    • getLinkLoginURL

      public static String getLinkLoginURL(javax.servlet.http.HttpServletRequest request)
      Get a login URL with the original request appended as the os_destination.

      If the original request contains the special parameter called atl_after_login_redirect then this will be encoded as the os_destination instead of the original request.

      Parameters:
      request -
      Returns:
      a login link with the ultimate destination appended as os_destination.
    • getLinkLoginURLAndStripContextPath

      public static String getLinkLoginURLAndStripContextPath(javax.servlet.http.HttpServletRequest request)
    • stripContextPathFromRequestURL

      public static String stripContextPathFromRequestURL(javax.servlet.http.HttpServletRequest request, String currentPageUrl)
    • getOriginalURL

      public static String getOriginalURL(javax.servlet.http.HttpServletRequest request)
    • getConfig

      public static com.atlassian.seraph.config.SecurityConfig getConfig(javax.servlet.http.HttpServletRequest request)
    • authenticate

      public static boolean authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Principal principal, String password) throws com.atlassian.seraph.auth.AuthenticatorException
      Throws:
      com.atlassian.seraph.auth.AuthenticatorException
      Since:
      9.3
    • addRememberMeCookie

      public static void addRememberMeCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Principal principal)
      Adds a "remember me" cookie to the response for the given principal.

      Note this is best carried out by Authenticator.login(HttpServletRequest, HttpServletResponse, String, String, boolean), but this method is provided as an alternative.

      Since:
      9.3