public interface RequestDataValueProcessor
Implementations may use this contract for example as part of a solution to provide data integrity, confidentiality, protection against cross-site request forgery (CSRF), and others or for other tasks such as automatically adding a hidden field to all forms and URLs.
View technologies that support this contract can obtain an instance to
delegate to via RequestContext.getRequestDataValueProcessor().
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getExtraHiddenFields(ServerWebExchange exchange)
Invoked after all form fields have been rendered.
|
java.lang.String |
processAction(ServerWebExchange exchange,
java.lang.String action,
java.lang.String httpMethod)
Invoked when a new form action is rendered.
|
java.lang.String |
processFormFieldValue(ServerWebExchange exchange,
java.lang.String name,
java.lang.String value,
java.lang.String type)
Invoked when a form field value is rendered.
|
java.lang.String |
processUrl(ServerWebExchange exchange,
java.lang.String url)
Invoked when a URL is about to be rendered or redirected to.
|
java.lang.String processAction(ServerWebExchange exchange, java.lang.String action, java.lang.String httpMethod)
exchange - the current exchangeaction - the form actionhttpMethod - the form HTTP methodjava.lang.String processFormFieldValue(ServerWebExchange exchange, java.lang.String name, java.lang.String value, java.lang.String type)
exchange - the current exchangename - the form field namevalue - the form field valuetype - the form field type ("text", "hidden", etc.)@Nullable java.util.Map<java.lang.String,java.lang.String> getExtraHiddenFields(ServerWebExchange exchange)
exchange - the current exchangenulljava.lang.String processUrl(ServerWebExchange exchange, java.lang.String url)
exchange - the current exchangeurl - the URL value