Interface InternalWebSudoManager
- All Known Implementing Classes:
InternalWebSudoManagerImpl
public interface InternalWebSudoManager
Manages the WebSudo related access to Request, Response and Session objects and provides a method to determine
if an XWork action should be treated as a WebSudo resource (
}.
invalid @link
{@link #matches(Class
-
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.
-
Method Details
-
isEnabled
boolean isEnabled()- Returns:
- true if WebSudo is enabled, false otherwise.
-
matches
Check if the action method should be WebSudo protected for the given requestURI.- Parameters:
actionClass- - the current action class- Returns:
- true if the action method should be WebSudo protected, false otherwise.
-
hasValidSession
boolean hasValidSession(@Nullable jakarta.servlet.http.HttpSession session) Check if this is a valid WebSudo session.- Parameters:
session- the currentHttpSession. Can be null- Returns:
- true if the
HttpSessionis a WebSudo session.
-
isWebSudoRequest
boolean isWebSudoRequest(@Nullable jakarta.servlet.http.HttpServletRequest request) Checks if therequestis a WebSudo request.- Parameters:
request- the currentHttpServletRequest- Returns:
- true if the current request is requesting a WebSudo protected web resource, false otherwise.
- Since:
- 3.4
-
startSession
void startSession(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Start a new WebSudo session. Creates a newHttpSessionif necessary.- Parameters:
request- the currentHttpServletRequestresponse- the currentHttpServletResponse- Since:
- 3.4
-
markWebSudoRequest
void markWebSudoRequest(@Nullable jakarta.servlet.http.HttpServletRequest request) Marks therequestas a request for a WebSudo resource.- Parameters:
request- the currentHttpServletRequest- Since:
- 3.4
-
invalidateSession
void invalidateSession(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Invalidate the current WebSudo session. This does NOT invalidate theHttpSession.- Parameters:
request- the currentHttpServletRequestresponse- the currentHttpServletResponse- Since:
- 3.4
-
getWebSudoAuthenticationUrl
Returns the WebSudo authentication URL for the given request. This method builds the same URL that would be used by the WebSudo dispatcher.- Parameters:
request- the currentHttpServletRequest- Returns:
- the WebSudo authentication URL with the current request as destination
- Since:
- 11.0
-