title: ASP.NET Core 2.0 - AddAuthentication and DefaultScheme
body: <p>I'm trying to upgrade an ASP.NET Core 1.1 application to 2.0.  The application needs two both the basic authentication and JWT one.  I have got code which looks something like this:</p>
  
  <pre><code>services.AddAuthentication(options =&gt;
                      {
                          options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
                      })
                  .AddBasic(BasicScheme, _ =&gt; { })
                  .AddJwtBearer(JwtBearerDefaults.AuthenticationScheme, options =&gt;
                  {...}
  </code></pre>
  
  <p>My problem is that I can't seem to get both of them to work at the same time!  Whichever one I set as the DefaultScheme is the only one that works and the other one breaks and returns a HTTP 401.</p>
  
  <p>Any ideas how can I get both of them to work?</p>