public final class AlwaysAllowAssertion extends java.lang.Object implements AccessAssertion
| Modifier and Type | Field and Description |
|---|---|
static AlwaysAllowAssertion |
INSTANCE
A public instance that can be used by all resource in the default case.
|
| Constructor and Description |
|---|
AlwaysAllowAssertion() |
| Modifier and Type | Method and Description |
|---|---|
void |
assertAccess(java.lang.String resourceDescription,
java.lang.Object protectedResource)
Checks that the user can access the resource.
|
org.json.JSONObject |
marshal()
Encode the assertion as JSON for later loading.
|
void |
unmarshal(org.json.JSONObject encodedAssertion)
Load the assertion properties from the JSON data.
|
void |
validate(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
validate that the configuration was correct.
|
public static final AlwaysAllowAssertion INSTANCE
public void assertAccess(java.lang.String resourceDescription,
java.lang.Object protectedResource)
AccessAssertionAuthenticationCredentialsNotFoundException if the user has
not logged in or supplied credentials.
Will throw AccessDeniedException if the user is logged in but may not access
the resource.assertAccess in interface AccessAssertionresourceDescription - a string describing the resource for logging and exception throwing purposesprotectedResource - the resource being protected.public org.json.JSONObject marshal()
AccessAssertionmarshal in interface AccessAssertionpublic void unmarshal(org.json.JSONObject encodedAssertion)
AccessAssertionunmarshal in interface AccessAssertionencodedAssertion - the assertion encoded as JSON.public void validate(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
ConfigurationObjectvalidate in interface ConfigurationObjectvalidationErrors - a list to add any detected errors to.configuration - the containing configuration