I’m working on a Rest Api with ASP Net Core 1.0. I use Swashbuckle 6.0.0-beta902 to generate à nice documentation. This documentation come with a Swagger's UI (accessible by swagger/ui/index.htm).
So I want to configure my application to require authenticated users for accessing the swagger/ui/ URL. Indeed, I want to restrict access to the documentation, only for allowed users.
With ASP Net Core 1.0, we just have to add a [Authorize] on a Class or a Method for require authenticated users. But how to defined that an URL need a authenticated user ?