Package com.vaadin.hilla.auth
Class CsrfIndexHtmlRequestListener
java.lang.Object
com.vaadin.hilla.auth.CsrfIndexHtmlRequestListener
- All Implemented Interfaces:
IndexHtmlRequestListener,Serializable,EventListener
An index HTML request listener that generates and sends a token for
Cross-Site Request Forgery protection (Double Submit Cookie pattern) of
endpoints.
Sets a JS readable cookie in the response with the CSRF token, if such a
cookie was not present in request.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmodifyIndexHtmlResponse(IndexHtmlResponse indexHtmlResponse) The method allows to modify the Index HTML response before it is sent to browser.
-
Constructor Details
-
CsrfIndexHtmlRequestListener
public CsrfIndexHtmlRequestListener()
-
-
Method Details
-
modifyIndexHtmlResponse
Description copied from interface:IndexHtmlRequestListenerThe method allows to modify the Index HTML response before it is sent to browser.- Specified by:
modifyIndexHtmlResponsein interfaceIndexHtmlRequestListener- Parameters:
indexHtmlResponse- the response object which includes theVaadinRequest,VaadinResponse, andDocument
-