title: Spring security 3 http-basic authentication-success-handler
body: <p>H i'm using spring security</p>
  
  <p>for form-login i have</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;http auto-config="true"&gt;
          &lt;intercept-url pattern="/pages/**" access="ROLE_USER" /&gt;
          &lt;form-login authentication-success-handler-ref="authenticationSuccessHandler" login-page="/login.html" default-target-url="/pages/index.html"
              always-use-default-target="true" authentication-failure-url="/login.html" /&gt;
          &lt;logout logout-success-url="/login.html" invalidate-session="true" /&gt;
          &lt;anonymous enabled='false'/&gt;
  &lt;/http&gt;
  </code></pre>
  
  <p>here i can set an <code>authentication-success-handler-ref</code>, how can i add one to my basic authentication:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;http pattern="/REST/**" realm="REALM" entry-point-ref="authenticationEntryPoint"&gt;
      &lt;intercept-url pattern="/**" access="ROLE_USER" /&gt;
      &lt;http-basic  /&gt;
      &lt;logout logout-url="/REST/logout" success-handler-ref="restLogoutSuccessHandler" /&gt;
  &lt;/http&gt;
  </code></pre>
  
  <p>i thought abour overriding BasicAuthenticationFilter, but how can i inject my cutom class for  <code>&lt;http-basic  /&gt;</code></p>