Class DefaultWebSudoManager
- java.lang.Object
-
- com.atlassian.confluence.security.websudo.DefaultWebSudoManager
-
- All Implemented Interfaces:
WebSudoManager
public class DefaultWebSudoManager extends Object implements WebSudoManager
SeeWebSudoManagerfor further documentation.
-
-
Constructor Summary
Constructors Constructor Description DefaultWebSudoManager(SettingsManager settingsManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasValidSession(javax.servlet.http.HttpSession session)Check if this is a valid WebSudo session.voidinvalidateSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Invalidate the current WebSudo session.booleanisEnabled()booleanisWebSudoRequest(javax.servlet.http.HttpServletRequest request)Checks if therequestis a WebSudo request.voidmarkWebSudoRequest(javax.servlet.http.HttpServletRequest request)Marks therequestas a request for a WebSudo resource.booleanmatches(String requestURI, Class<?> actionClass, Method method)Check if the action method should be WebSudo protected for the given requestURI.voidstartSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Start a new WebSudo session.
-
-
-
Constructor Detail
-
DefaultWebSudoManager
public DefaultWebSudoManager(SettingsManager settingsManager)
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceWebSudoManager- Returns:
- true if WebSudo is enabled, false otherwise.
-
matches
public boolean matches(String requestURI, Class<?> actionClass, Method method)
Description copied from interface:WebSudoManagerCheck if the action method should be WebSudo protected for the given requestURI.- Specified by:
matchesin interfaceWebSudoManager- Parameters:
requestURI- - the requestURI for this action methodactionClass- - the current action classmethod- - the action method that is executed- Returns:
- true if the action method should be WebSudo protected, false otherwise.
-
hasValidSession
public boolean hasValidSession(javax.servlet.http.HttpSession session)
Description copied from interface:WebSudoManagerCheck if this is a valid WebSudo session.- Specified by:
hasValidSessionin interfaceWebSudoManager- Parameters:
session- the currentHttpSession. Can be null- Returns:
- true if the
HttpSessionis a WebSudo session.
-
startSession
public void startSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Description copied from interface:WebSudoManagerStart a new WebSudo session. Creates a newHttpSessionif necessary.- Specified by:
startSessionin interfaceWebSudoManager- Parameters:
request- the currentHttpServletRequestresponse- the currentHttpServletResponse
-
markWebSudoRequest
public void markWebSudoRequest(javax.servlet.http.HttpServletRequest request)
Description copied from interface:WebSudoManagerMarks therequestas a request for a WebSudo resource.- Specified by:
markWebSudoRequestin interfaceWebSudoManager- Parameters:
request- the currentHttpServletRequest
-
isWebSudoRequest
public boolean isWebSudoRequest(javax.servlet.http.HttpServletRequest request)
Description copied from interface:WebSudoManagerChecks if therequestis a WebSudo request.- Specified by:
isWebSudoRequestin interfaceWebSudoManager- Parameters:
request- the currentHttpServletRequest- Returns:
- true if the current request is requesting a WebSudo protected web resource, false otherwise.
-
invalidateSession
public void invalidateSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Description copied from interface:WebSudoManagerInvalidate the current WebSudo session. This does NOT invalidate theHttpSession.- Specified by:
invalidateSessionin interfaceWebSudoManager- Parameters:
request- the currentHttpServletRequestresponse- the currentHttpServletResponse
-
-