public interface SecurityAdapter<T>
Input and Output.
SecurityAdapter must define a default constructor so that it can be created and auto-generated by factories etc.| Modifier and Type | Field and Description |
|---|---|
static String |
REGEX_PROP_FILE
Default properties bundled with library.
|
| Modifier and Type | Method and Description |
|---|---|
Data<T> |
sanitize(Data<T> data)
Sanitize content, from malicious to harmless.
|
void |
validate(Data<T> input)
Check if the input is safe or not
When used in a chained or a SecurityContext with other SecurityAdapters then the Adapters throwing
a OperationNotSupportedException will be ignored. |
static final String REGEX_PROP_FILE
void validate(Data<T> input) throws SecurityException, OperationNotSupportedException, IOException
SecurityContext with other SecurityAdapters then the Adapters throwing
a OperationNotSupportedException will be ignored.input - as DataIllegalArgumentException - if the input is not readable or understandableSecurityException - is its is not safe. This is to provide additional details about the failure that te return param cannot.IOException - for any type of setup, reading, infra related issue with files/configsOperationNotSupportedExceptionData<T> sanitize(Data<T> data) throws Exception, OperationNotSupportedException
OperationNotSupportedException.
When used in a chained or a SecurityContext with other SecurityAdapters then the Adapters throwing
a OperationNotSupportedException will be ignored. Any other exception will be thrown if there is
an issue in the executionof the sanitization process.input - Exception, - OperationNotSupportedExceptionExceptionOperationNotSupportedExceptionCopyright © 2018. All rights reserved.