Package com.vaadin.hilla.auth
Class CsrfIndexHtmlRequestListener
java.lang.Object
com.vaadin.hilla.auth.CsrfIndexHtmlRequestListener
- All Implemented Interfaces:
com.vaadin.flow.server.communication.IndexHtmlRequestListener,Serializable,EventListener
public class CsrfIndexHtmlRequestListener
extends Object
implements com.vaadin.flow.server.communication.IndexHtmlRequestListener
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(com.vaadin.flow.server.communication.IndexHtmlResponse indexHtmlResponse)
-
Constructor Details
-
CsrfIndexHtmlRequestListener
public CsrfIndexHtmlRequestListener()
-
-
Method Details
-
modifyIndexHtmlResponse
public void modifyIndexHtmlResponse(com.vaadin.flow.server.communication.IndexHtmlResponse indexHtmlResponse) - Specified by:
modifyIndexHtmlResponsein interfacecom.vaadin.flow.server.communication.IndexHtmlRequestListener
-