public interface WebSudoManager
Usage pattern:
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
try {
webSudoManager.willExecuteWebSudoRequest(request);
// do something
} catch(WebSudoSessionException wes) {
webSudoManager.enforceWebSudoProtection(request, response);
}
}
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExecuteRequest(javax.servlet.http.HttpServletRequest request)
Check whether this request can be executed.
|
void |
enforceWebSudoProtection(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Ensure that the current request is protected by a WebSudo session.
|
void |
willExecuteWebSudoRequest(javax.servlet.http.HttpServletRequest request)
Mark the current request as a request for a WebSudo protected resource.
|
boolean canExecuteRequest(javax.servlet.http.HttpServletRequest request)
Calling this method has no side effects.
request - the current HttpServletRequesttrue if this request is protected by a WebSudo session or WebSudo is disabled, false otherwise.void enforceWebSudoProtection(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This is a no op if this request is already
protected by a WebSudo session (i.e. canExecuteRequest(javax.servlet.http.HttpServletRequest) would return true).
request - the current HttpServletRequestresponse - the current HttpServletResponsevoid willExecuteWebSudoRequest(javax.servlet.http.HttpServletRequest request)
throws WebSudoSessionException
Throws a WebSudoSessionException if the current request is not protected by WebSudo.
This notifies the host application that the request is a request for a WebSudp protected resource.
request - the current HttpServletRequestWebSudoSessionException - if the current request is not protected by WebSudo.Copyright © 2019 Atlassian. All rights reserved.