title: Cookie Authentication not working with Authorization policy in asp.net core
body: <p>Upgrading Scott Wildermuth's World Trip app to ASP.NET Core 2.0. The code below is not working.</p>
  
  <p>Since I am using two authentication types and I would like both to work on the api controllers, I decided to use an Authorization policy.</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
     //Some code here
     services.AddAuthentication()
         .AddCookie()
         .AddJwtBearer(/*Implementation is fine*/);
  
     services.AddAuthorization(options =&gt;
     {
         options.AddPolicy("Authenticated", policy =&gt;
         {
             policy.AddAuthenticationSchemes(
                 CookieAuthenticationDefaults.AuthenticationScheme,
                 JwtBearerDefaults.AuthenticationScheme)
                     .RequireAuthenticatedUser();
         });
     });
  }
  </code></pre>
  
  <p>Now in my controllers,</p>
  
  <pre><code>namespace TheWorld.Controllers.Api
  {
      [Route("api/trips")]
      [Authorize(policy: "Authenticated")]
      public class TripsController : controller
      {
        // Implementation is fine
      }
  }
  </code></pre>
  
  <p>Requests coming from client (web) with cookie authentication is never seen as authenticated while requests from Jwt authenticated clients work as expected.</p>
  
  <p>It only works with cookie authentication if I use the simple <code>[Authorize]</code> on the controller, in which asp.net core just chooses the default cookie authentication and never accepts requests from Jwt Clients.</p>