title: Does securing a REST application with a JWT and Basic authentication make sense?
body: <p>I have a Spring REST application which at first was secured with Basic authentication.</p>
  
  <p>Then I added a login controller that creates a JWT JSON Web Token which is used in subsequent requests.</p>
  
  <p>Could I move the following code out of the login controller and into the security filter? Then I would not need the login controller any longer. </p>
  
  <pre><code>tokenAuthenticationService.addTokenToResponseHeader(responseHeaders, credentialsResource.getEmail());
  </code></pre>
  
  <p>Or could I remove the Basic authentication?</p>
  
  <p>Is it a good design to mix Basic authentication with a JWT?</p>
  
  <p>Although it all works fine, I'm a bit in the dark here as to best design this security.</p>