Closed Raj1633 closed 4 years ago
Hi,
unfortunately this package doesn't support Swagger UI authentification.
The only thing you can use is settings DownstreamSwaggerHeaders
. This headers will be send when requesting a swagger endpoint.
app.UseSwaggerForOcelotUI(Configuration, opt => {
opts.DownstreamSwaggerHeaders = new[]
{
new KeyValuePair<string, string>("Auth-Key", "AuthValue"),
};
})
If you need to dynamically forward headers from the original SwaggerUI request, then theoretically you can implement cusom IEnumerable<KeyValuePair<string, string>>
which takes the request headers from the current httpContext
and set to DownstreamSwaggerHeaders
property.
@Burgyn thanks for your response
Hi,
Please guide how to enable JWT authentication verification in swagger UI while generating using MMLib.SwaggerForOcelot.