title: How to set multiple api Key with Swashbuckle in the request's header
body: <p>I've a web api2 project, where I've implemented swashbuckle for test and documentation of my web services.
  I've tried to set an apiKey for the authentication in the SwaggerDocsConfig and it works, but if I want to add another apiKey (<strong>apiKey</strong> and <strong>appId</strong>) I can't make it works.</p>
  
  <p>I read in the <a href="https://swagger.io/docs/specification/2-0/authentication/api-keys/" rel="nofollow noreferrer">swagger doc</a> that is possible, but I don't get how to configuring the swagger docs in this way, with swashbuckle.</p>
  
  <p><em>How Swagger docs should be</em></p>
  
  <pre><code>securityDefinitions:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY
    appId:
      type: apiKey
      in: header
      name: X-APP-ID
  security:
    - apiKey: []
      appId: []
  </code></pre>
  
  <p>I've tried to simply add another ApiKey when I enable swagger in my project (see code above), but it didn't work.</p>
  
  <pre><code>    GlobalConfiguration.Configuration.EnableSwagger(swagger =&gt;
              {
                  swagger.RootUrl(req =&gt; req.RequestUri.GetLeftPart(UriPartial.Authority).TrimEnd('/') + req.GetRequestContext().VirtualPathRoot.TrimStart('/'));
                  swagger.PrettyPrint();
                  c.SingleApiVersion("v1", "Project.WebApi");             
                  swagger.ApiKey("apiKey") //First ApiKey
                      .Description("API Key Authentication")
                      .Name("Authorization")
                      .In("header");
                  swagger.ApiKey("apiId") //Second ApiKey
                      .Description("API Key Authentication")
                      .Name("Authorization") //Same Schema
                      .In("header");                              
                  swagger.IncludeXmlComments(string.Format(@"{0}\bin\Project.WebApi.XML", System.AppDomain.CurrentDomain.BaseDirectory));
                  swagger.ResolveConflictingActions(apiDescriptions =&gt; apiDescriptions.First());
              })
              .EnableSwaggerUi(swagger =&gt;
              {
                  swagger.DocumentTitle("Project API");               
                  swagger.DocExpansion(DocExpansion.List);
                  swagger.EnableDiscoveryUrlSelector();
                  swagger.EnableApiKeySupport("Authorization", "header");
              });
  </code></pre>
  
  <p>Is it possible to do it with Swashbuckle, or I have to inject an js script and do it from client-side?</p>
  
  <p>Thanks</p>