Basic Auth with swashbuckle in OWIN Self Hosted REST API
I implemented swagger on my windows NT OWIN Self Hosted REST API.
Now I should use swagger with Basic Authentication but I can't find examples that work in this environment.
Can anyone help me about how to properly configure swagger to use Basic Auth in the self host api?
Hi @ErikIce ,
Swagger/OpenAPI can be used to describe basic authentication, and can help with that side. But I don't know the specifics of OWIN to advise how to integrate a Basic Auth layer in ASP.NET (or OWIN).
If you're asking about protecting the SwaggerUI (the docs view) with Basic Auth, then you may need to configure that via the IIS or other config layer that is accessed before the server renders SwaggerUI.
Sorry I can't be more helpful.