Techiio-author
Started by Teresa PortelaSep 14, 2021

Open
Spring Security - CSRF Token

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

I'm trying to implement Spring Security in my project. I'm trying to inject the CSRF token automatically using thymeleaf, but the token won't inject.

<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>

I have that in my .HTML page but when I inspect the page and look at the element, that is what literally it shows. The token is never passed there. I know the token is generated because I have a logger that logs the token to intellij. If someone can please help <3

0 Replies

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance