title: Swagger PreAuthorize bearer token
body: <p>Pre-fill the Bearer token with a JWT returned from service and set and set Authorized to True, so the user does not have to manually click the authorize button and enter the token. But UI just doesn't send the property authorization.</p>
  
  <blockquote>
    <p>Swagger UI</p>
  </blockquote>
  
  <pre><code>ui = SwaggerUIBundle({
                      url: "https://localhost:44318/swagger/v1/swagger.json",
                      onComplete: function () {
  
                          // Default API key
                          ui.preauthorizeApiKey("bearer", token);
                      }
                  })
  </code></pre>
  
  <blockquote>
    <p>Security Scheme</p>
  </blockquote>
  
  <pre><code>            c.AddSecurityDefinition("bearer", new OpenApiSecurityScheme {
                  Description = x.SwaggerAuthorization_desc,
                  Name = "Authorization",
                  In = ParameterLocation.Header,
                  Type = SecuritySchemeType.ApiKey,
                  Scheme = "Bearer",
              });
  
              c.AddSecurityRequirement(new OpenApiSecurityRequirement
              {
                  {
                      new OpenApiSecurityScheme
                      {
                          Reference = new OpenApiReference {
                              Type = ReferenceType.SecurityScheme,
                              Id = "bearer"
                          }
                      },
                      new string[] {}
                  }
              });
  </code></pre>
  
  <hr>
  
  <p>SwaggerUI: 5.0.0</p>
  
  <p>OpenAPI: 3.0.1</p>
  
  <p>SecuritySchemes: Bearer</p>
  
  <hr>