Interface WebSudoManager
- All Known Implementing Classes:
DefaultWebSudoManager
public interface WebSudoManager
Manages the WebSudo related access to Request, Response and Session objects and provides a method to determine if
Servlets or Struts actions should be WebSudo protected.
-
Method Summary
Modifier and TypeMethodDescriptionbuildAuthenticationRedirectUri
(jakarta.servlet.http.HttpServletRequest request) boolean
canExecuteRequest
(jakarta.servlet.http.HttpServletRequest httpServletRequest) void
enforceWebSudoProtection
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) boolean
hasValidSession
(@Nullable 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
(@Nullable jakarta.servlet.http.HttpServletRequest request) Checks if therequest
is a WebSudo request.void
markWebSudoRequest
(@Nullable jakarta.servlet.http.HttpServletRequest request) Marks therequest
as a request for a WebSudo resource.boolean
Check if a Class method should be WebSudo protected for a given request servlet pathvoid
startSession
(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 a Class method should be WebSudo protected for a given request servlet path- Parameters:
requestServletPath
- the request servlet pathactionClass
- Action or Servlet classmethod
- Name of method on class being executed- Returns:
- true if the Class 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
HttpSession
is a WebSudo session.
-
isWebSudoRequest
boolean isWebSudoRequest(@Nullable jakarta.servlet.http.HttpServletRequest request) Checks if therequest
is 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 newHttpSession
if necessary.- Parameters:
request
- the currentHttpServletRequest
response
- the currentHttpServletResponse
- Since:
- 3.4
-
markWebSudoRequest
void markWebSudoRequest(@Nullable jakarta.servlet.http.HttpServletRequest request) Marks therequest
as 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 currentHttpServletRequest
response
- the currentHttpServletResponse
- Since:
- 3.4
-
buildAuthenticationRedirectUri
-
canExecuteRequest
boolean canExecuteRequest(jakarta.servlet.http.HttpServletRequest httpServletRequest) - Since:
- 9.3
- See Also:
-
enforceWebSudoProtection
void enforceWebSudoProtection(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException - Throws:
IOException
- Since:
- 9.3
- See Also:
-