Class InternalWebSudoManagerImpl

java.lang.Object
com.atlassian.jira.security.websudo.InternalWebSudoManagerImpl
All Implemented Interfaces:
InternalWebSudoManager

public class InternalWebSudoManagerImpl extends Object implements InternalWebSudoManager
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    InternalWebSudoManagerImpl(ApplicationProperties applicationProperties, WebsudoAuditHandler websudoAuditHandler)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getWebSudoAuthenticationUrl(jakarta.servlet.http.HttpServletRequest request)
    Returns the WebSudo authentication URL for the given request.
    boolean
    hasValidSession(jakarta.servlet.http.HttpSession session)
    Check if this is a valid WebSudo session.
    void
    invalidateSession(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Invalidate the current WebSudo session.
    boolean
     
    boolean
    isWebSudoRequest(jakarta.servlet.http.HttpServletRequest request)
    Checks if the request is a WebSudo request.
    void
    markWebSudoRequest(jakarta.servlet.http.HttpServletRequest request)
    Marks the request as a request for a WebSudo resource.
    boolean
    matches(Class<? extends webwork.action.Action> actionClass)
    Check if the action method should be WebSudo protected for the given requestURI.
    void
    startSession(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Start a new WebSudo session.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface InternalWebSudoManager
      Returns:
      true if WebSudo is enabled, false otherwise.
    • matches

      public boolean matches(Class<? extends webwork.action.Action> actionClass)
      Description copied from interface: InternalWebSudoManager
      Check if the action method should be WebSudo protected for the given requestURI.
      Specified by:
      matches in interface InternalWebSudoManager
      Parameters:
      actionClass - - the current action class
      Returns:
      true if the action method should be WebSudo protected, false otherwise.
    • hasValidSession

      public boolean hasValidSession(@Nullable jakarta.servlet.http.HttpSession session)
      Description copied from interface: InternalWebSudoManager
      Check if this is a valid WebSudo session.
      Specified by:
      hasValidSession in interface InternalWebSudoManager
      Parameters:
      session - the current HttpSession. Can be null
      Returns:
      true if the HttpSession is a WebSudo session.
    • isWebSudoRequest

      public boolean isWebSudoRequest(@Nullable jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: InternalWebSudoManager
      Checks if the request is a WebSudo request.
      Specified by:
      isWebSudoRequest in interface InternalWebSudoManager
      Parameters:
      request - the current HttpServletRequest
      Returns:
      true if the current request is requesting a WebSudo protected web resource, false otherwise.
    • startSession

      public void startSession(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Description copied from interface: InternalWebSudoManager
      Start a new WebSudo session. Creates a new HttpSession if necessary.
      Specified by:
      startSession in interface InternalWebSudoManager
      Parameters:
      request - the current HttpServletRequest
      response - the current HttpServletResponse
    • markWebSudoRequest

      public void markWebSudoRequest(@Nullable jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: InternalWebSudoManager
      Marks the request as a request for a WebSudo resource.
      Specified by:
      markWebSudoRequest in interface InternalWebSudoManager
      Parameters:
      request - the current HttpServletRequest
    • invalidateSession

      public void invalidateSession(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Description copied from interface: InternalWebSudoManager
      Invalidate the current WebSudo session. This does NOT invalidate the HttpSession.
      Specified by:
      invalidateSession in interface InternalWebSudoManager
      Parameters:
      request - the current HttpServletRequest
      response - the current HttpServletResponse
    • getWebSudoAuthenticationUrl

      public String getWebSudoAuthenticationUrl(jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: InternalWebSudoManager
      Returns the WebSudo authentication URL for the given request. This method builds the same URL that would be used by the WebSudo dispatcher.
      Specified by:
      getWebSudoAuthenticationUrl in interface InternalWebSudoManager
      Parameters:
      request - the current HttpServletRequest
      Returns:
      the WebSudo authentication URL with the current request as destination