public class DefaultWhitelistManager extends Object implements WhitelistManager
| Constructor and Description |
|---|
DefaultWhitelistManager() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getRules()
Returns a list of rules that are currently allowed in the whitelist.
|
boolean |
isAllowed(URI uri)
Checks if requests to the provided URI are allowed according to the current whitelist configuration
|
boolean |
isDisabled()
Returns true if the whitelist is currently disabled (meaning all requests are allowed).
|
List<String> |
updateRules(List<String> newRules,
boolean disabled)
Used to update the whitelist configuration.
|
public List<String> getRules()
WhitelistManagergetRules in interface WhitelistManagerpublic boolean isDisabled()
WhitelistManagerisDisabled in interface WhitelistManagerpublic List<String> updateRules(List<String> newRules, boolean disabled)
WhitelistManagerThe method then returns the peristed rules
updateRules in interface WhitelistManagernewRules - List of rules to persistdisabled - True if the whitelist should be switched offpublic boolean isAllowed(URI uri)
WhitelistManagerisAllowed in interface WhitelistManageruri - The uri a http request is made toCopyright © 2002-2022 Atlassian. All Rights Reserved.