AEM Forms - CSRF Token Verification
Hi,
I am interested in how the CSRF protection works in AEM Forms when submitting to a REST endpoint (custom sling servlet deployed to AEM).
I see that there is a ":cq_csrf_token" inserted when my form is submitted and I can see it is passed in the request.
1) Is this token automatically verified by AEM when POSTing to a rest endpoint - if so, how does it achieve this?
2) If this is not automatically verified what code would be needed within my rest endpoint in order to validate the csrf token is legitimate?
I have searched for this information but cannot find all of the details, can someone point me in the right direction?
Thanks,
Jim