title: spring cloud zuul ouath2 password authentication
body: <p>i am currently building a security solution in spring cloud microservices. </p>
  
  <p>when combining springs OAuth2 and Zuul implementation, it is quite easy to build an authenticationprocess like:</p>
  
  <ul>
  <li>user calls the ui, which knows initially: user is not authenticated</li>
  <li>redirect to auth server to ask the user for his login creds</li>
  <li>redirects him back to the ui, providing a code or token.</li>
  </ul>
  
  <p>I would prefer a flow with password authentication  flow, in a way where the auth server is behind zuul</p>
  
  <p>For example:</p>
  
  <ul>
  <li>1.2.3.4:8080 is Zuul (with a UI with angularJS), domain "example.com"</li>
  <li>1.2.3.5:9000 is the Auth Server</li>
  </ul>
  
  <p>I could configure the zuul in a way, to access 1.2.3.5:9000 directly, passing form fields AND basic authentication to pass the client id.</p>
  
  <p>since the auth server registers itself to eureka, I could also use "example.com/auth_server", which is the same, but managed through zuul. Alternatively I could also configure it manually....nevertheless:</p>
  
  <p>Password authentication does not work, since Zuul is removing the basic authentication header from call....</p>
  
  <p>at this point, I see I am doing something wrong...because the edge serve COULD have it's own security solution and tunneling the basic authentication to auth may be not the best way....but</p>
  
  <p>HOW can I manage password authentication with ouath2 through zuul?</p>
  
  <p>Please Help :)</p>