CSRF Token with Spring Security
<p>I have a services layer project protected by spring security and a html5 project secured by saml. </p>

<p>When I'm trying to invoke rest APIs from my html5 app, GET requests are a success and I'm able to retrieve the data perfectly.</p>

<p>However, when I try to post/put data, then I'm getting the CSRF Token issue. I donot want to disable this in spring security as it could lead to potential malware attacks.</p>

<p>Can someone suggest me how to retrieve the csrf token from services layer and pass is back in the header while doing a post operation service call.</p>

<p>I searched online extensively but could not find the right link. Any pointers on this would be of immense help to me :)</p>