title: Add request header after successfull authentication in Spring
body: <p>I have an app where authentication of JWT token is done using spring security custom filter. The configuration looks as below to invoke the customer filter which does the authentication.</p>
  <pre><code>    &lt;security:http entry-point-ref=&quot;authenticationEntryPoint&quot;&gt;
        &lt;security:custom-filter after=&quot;BASIC_AUTH_FILTER&quot; ref=&quot;TokenValidationFilter&quot; /&gt;
        &lt;security:session-management&gt;
          &lt;security:concurrency-control max-sessions=&quot;1&quot; /&gt;
        &lt;/security:session-management&gt;
        &lt;security:csrf disabled=&quot;true&quot;/&gt;
        &lt;security:anonymous enabled=&quot;false&quot;/&gt;
      &lt;/security:http&gt;
  </code></pre>
  <p>I extended AbstractAuthenticationProcessingFilter class and implemented TokenValidationFilter and able to authenticate the token received in request header. After successfull authentication,  I want to call an another external API and get few values and append them in current request header.   AbstractAuthenticationProcessingFilter class offers successfulAuthentication method as callback where I can do the external call and modify the request header. But I want to have a separate class or filter which needs to be invoked after successfull authentication for code maintainablility. Please let me know whether Spring offers any option for this. I am newbie to Spring and searched multiple sites but could not figure out how to approach this. Any suggestion would be much helpful.Thanks</p>