Package com.atlassian.bamboo.sal
Interface BambooWebSudoManager
- All Superinterfaces:
com.atlassian.sal.api.websudo.WebSudoManager
- All Known Implementing Classes:
BambooWebSudoManagerImpl
public interface BambooWebSudoManager
extends com.atlassian.sal.api.websudo.WebSudoManager
An extension of
WebSudoManager
to provide Bamboo with the ability to start a web sudo session.- Since:
- 10.0
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetWebSudoSessionExpiry
(@Nullable javax.servlet.http.HttpServletRequest request) Returns the expiry time of the current web sudo session, if one existsboolean
isUnableToHoldWebSudo
(@Nullable javax.servlet.http.HttpServletRequest request) Checks if the current request is unable to hold a web sudo session.void
removeWebSudoFromSession
(@Nullable javax.servlet.http.HttpServletRequest request) Removes the web sudo attribute from the current session, if one existsvoid
setWebSudoSession
(@Nullable javax.servlet.http.HttpServletRequest request, @Nullable javax.servlet.http.HttpServletResponse response) Sets the web sudo timestamp on the current session and the web sudo headers if the response is passed.Methods inherited from interface com.atlassian.sal.api.websudo.WebSudoManager
canExecuteRequest, enforceWebSudoProtection, willExecuteWebSudoRequest
-
Field Details
-
WEB_SUDO_HEADER
- See Also:
-
WEB_SUDO_HEADER_VALUE_AUTHORISED
- See Also:
-
WEB_SUDO_HEADER_VALUE_REQUIRE_AUTHENTICATION
- See Also:
-
WEB_SUDO_REQUEST_ATTRIBUTE
- See Also:
-
-
Method Details
-
setWebSudoSession
void setWebSudoSession(@Nullable @Nullable javax.servlet.http.HttpServletRequest request, @Nullable @Nullable javax.servlet.http.HttpServletResponse response) Sets the web sudo timestamp on the current session and the web sudo headers if the response is passed.- Parameters:
request
- the current requestresponse
- the response for the current request
-
isUnableToHoldWebSudo
boolean isUnableToHoldWebSudo(@Nullable @Nullable javax.servlet.http.HttpServletRequest request) Checks if the current request is unable to hold a web sudo session. Reasons for this could be that the feature is disabled, the user is not an admin, the user is making a request from a non-allowed IP address, etc.- Parameters:
request
- the current request- Returns:
false
if the request is able to hold a web sudo session,true
otherwise
-
getWebSudoSessionExpiry
@NotNull @NotNull Optional<Instant> getWebSudoSessionExpiry(@Nullable @Nullable javax.servlet.http.HttpServletRequest request) Returns the expiry time of the current web sudo session, if one exists- Parameters:
request
- the current request- Returns:
- the expiry time of the current web sudo session, if one exists
-
removeWebSudoFromSession
void removeWebSudoFromSession(@Nullable @Nullable javax.servlet.http.HttpServletRequest request) Removes the web sudo attribute from the current session, if one exists- Parameters:
request
- the current request
-