title: Spring Security anonymous 401 instead of 403
body: <p>I have a problem with default behaviour in spring security with authorize requests provided with Java Config. </p>
  
  <pre><code>http
         ....
         .authorizeRequests()
            .antMatchers("/api/test/secured/*").authenticated()
  </code></pre>
  
  <p>When I do a call to for example <code>/api/test/secured/user</code> without login (with anonymous user), it returns 403 Forbidden. Is there an easy way to change status to 401 Unauthorized when anonymous user wants to get secured by <code>authenticated()</code> or <code>@PreAuthorize</code> resource?</p>