Class InternalWebSudoManagerImpl
java.lang.Object
com.atlassian.jira.security.websudo.InternalWebSudoManagerImpl
- All Implemented Interfaces:
InternalWebSudoManager
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInternalWebSudoManagerImpl(ApplicationProperties applicationProperties, WebsudoAuditHandler websudoAuditHandler) -
Method Summary
Modifier and TypeMethodDescriptiongetWebSudoAuthenticationUrl(jakarta.servlet.http.HttpServletRequest request) Returns the WebSudo authentication URL for the given request.booleanhasValidSession(jakarta.servlet.http.HttpSession session) Check if this is a valid WebSudo session.voidinvalidateSession(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Invalidate the current WebSudo session.booleanbooleanisWebSudoRequest(jakarta.servlet.http.HttpServletRequest request) Checks if therequestis a WebSudo request.voidmarkWebSudoRequest(jakarta.servlet.http.HttpServletRequest request) Marks therequestas a request for a WebSudo resource.booleanCheck if the action method should be WebSudo protected for the given requestURI.voidstartSession(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Start a new WebSudo session.
-
Field Details
-
WEBSUDO
- See Also:
-
-
Constructor Details
-
InternalWebSudoManagerImpl
public InternalWebSudoManagerImpl(ApplicationProperties applicationProperties, WebsudoAuditHandler websudoAuditHandler)
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceInternalWebSudoManager- Returns:
- true if WebSudo is enabled, false otherwise.
-
matches
Description copied from interface:InternalWebSudoManagerCheck if the action method should be WebSudo protected for the given requestURI.- Specified by:
matchesin interfaceInternalWebSudoManager- 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:InternalWebSudoManagerCheck if this is a valid WebSudo session.- Specified by:
hasValidSessionin interfaceInternalWebSudoManager- Parameters:
session- the currentHttpSession. Can be null- Returns:
- true if the
HttpSessionis a WebSudo session.
-
isWebSudoRequest
public boolean isWebSudoRequest(@Nullable jakarta.servlet.http.HttpServletRequest request) Description copied from interface:InternalWebSudoManagerChecks if therequestis a WebSudo request.- Specified by:
isWebSudoRequestin interfaceInternalWebSudoManager- Parameters:
request- the currentHttpServletRequest- 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:InternalWebSudoManagerStart a new WebSudo session. Creates a newHttpSessionif necessary.- Specified by:
startSessionin interfaceInternalWebSudoManager- Parameters:
request- the currentHttpServletRequestresponse- the currentHttpServletResponse
-
markWebSudoRequest
public void markWebSudoRequest(@Nullable jakarta.servlet.http.HttpServletRequest request) Description copied from interface:InternalWebSudoManagerMarks therequestas a request for a WebSudo resource.- Specified by:
markWebSudoRequestin interfaceInternalWebSudoManager- Parameters:
request- the currentHttpServletRequest
-
invalidateSession
public void invalidateSession(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Description copied from interface:InternalWebSudoManagerInvalidate the current WebSudo session. This does NOT invalidate theHttpSession.- Specified by:
invalidateSessionin interfaceInternalWebSudoManager- Parameters:
request- the currentHttpServletRequestresponse- the currentHttpServletResponse
-
getWebSudoAuthenticationUrl
Description copied from interface:InternalWebSudoManagerReturns the WebSudo authentication URL for the given request. This method builds the same URL that would be used by the WebSudo dispatcher.- Specified by:
getWebSudoAuthenticationUrlin interfaceInternalWebSudoManager- Parameters:
request- the currentHttpServletRequest- Returns:
- the WebSudo authentication URL with the current request as destination
-