title: Authenticating requests to Microsoft.Owin.Testing.TestServer
body: <p>I'm using the owin TestServer class to unit test my web api.  It's working great except that I'm unsure how to authenticate requests, so I can't really test endpoints that require authentication, other than to make sure that unauthenticated requests are unauthorized.  </p>
  
  <p>I am configuring WebApi to use only bearer token authentication as indicated here:</p>
  
  <pre><code>// Web API configuration and services
  // Configure Web API to use only bearer token authentication.
  config.SuppressDefaultHostAuthentication();
  config.Filters.Add(new HostAuthenticationFilter(OAuthDefaults.AuthenticationType));
  </code></pre>
  
  <p>Any ideas how I could do this easily?</p>