title: AngularJs -.net MVC WebApi Authentication example
body: <p>I have a .Net MVC WebApi app and trying to write the front end exclusively in Angularjs.  I am able to get data via json and manipulate it but I now need to secure the data and have added Base64 authentication into the headers on the server.  When I browse to some of my .net view test pages, I get the appropriate login box asking for user/pass so I can continue to get the json.</p>
  
  <p>What I don't know how to do is pass this info (user/pass) in the headers that angular is setting up in my $resource.  Is there any complete examples that might better show me how to do this?  I know it involves cookies and using the token the server passes back but I don't know how to put the pieces together.</p>
  
  <p>When I get all this together I hope to post a complete skeleton example of this thru all the layers (DAL, RESTFUL, console test layer).</p>
  
  <p>So the question is - how do you insert the authentication info into the headers on the client when using AngularJS $resources?</p>
  
  <p>Thanks</p>