Package dev.hilla.auth
Class CsrfIndexHtmlRequestListener
- java.lang.Object
-
- dev.hilla.auth.CsrfIndexHtmlRequestListener
-
- All Implemented Interfaces:
IndexHtmlRequestListener,Serializable,EventListener
public class CsrfIndexHtmlRequestListener extends Object implements 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:
CsrfChecker, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CsrfIndexHtmlRequestListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmodifyIndexHtmlResponse(IndexHtmlResponse indexHtmlResponse)
-
-
-
Method Detail
-
modifyIndexHtmlResponse
public void modifyIndexHtmlResponse(IndexHtmlResponse indexHtmlResponse)
- Specified by:
modifyIndexHtmlResponsein interfaceIndexHtmlRequestListener
-
-