title: 403 Forbidden Invalid CSRF
body: <p>I am building a web app using spring security and thymeleaf, I got it work with login and logout, but I have some issues when I try to register as an end user. I am getting an invalid csrf token error. I am new to this, and I could use some help. My question is how can I attach a token to that request?(Post /registration) By the way I haven't used any XML, I use annotations.</p>
  
  <p>This is the request</p>
  
  <pre><code>    $scope.registerUser = function() {
        $http.post(BASE_URL + "/registration", $scope.registrationRequest).
            success(function (data, status, headers, config) {
              $log.info("Success: " + headers('Location'));
              $scope.hasRegistered = true;
            }).error(function(data, status, headers, config) {
               $scope.hasRegisterErrors = true;
               $log.info("Error: status =" + status + ", body =" + JSON.stringify(data));
            });
    }
  </code></pre>
  
  <p>And the error</p>
  
  <pre><code>    Error: status =403, body ={"timestamp":1430645356572,"status":403,"error":"Forbidden","message":"Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'.","path":"/registration"}
  </code></pre>