title: Secure swagger docs page with username and password Asp Net Core 2.1
body: <p>I am using Asp.Net Core 2.1 Web Api with Swashbuckle.aspnetcore.swagger</p>
  
  <p>I want to secure api documentation page with username and password  before granting access.</p>
  
  <p>Sample documention page 
  <a href="https://i.stack.imgur.com/RLMci.png" rel="noreferrer"><img src="https://i.stack.imgur.com/RLMci.png" alt="enter image description here"></a></p>
  
  <p>To make sure its not accessible by the public</p>