title: Spring Security based authentication for a REST service
body: <p>I'm in the process of implementing a REST service with Spring MVC and Spring Security (both 3.0.5). I'm using the security namespace not defining the Spring beans by hand. 
  I'm having some difficulties with the login process. What I'm trying to achive is this: </p>
  
  <p><em>a POST to a /login URL would begin the authentication process.</em></p>
  
  <p>There should be no actual form, so I'm not using the <em>form-login...</em> element. Without this element, the <em>UsernamePasswordAuthenticationFilter</em> isn't present on the security chain, so I thought I'd add it via a <em>custom-filter...</em> element and go on from there. </p>
  
  <p>That's the gist of it, not for the questions: </p>
  
  <ul>
  <li>is this a good way to implement authentication?</li>
  <li>how exactly should I add this filter and on what position in the filter chain?</li>
  <li>is it enough to add this filter or do I need something else as well?</li>
  </ul>
  
  <p>Any feedback is appreciated. 
  Thanks. </p>