Basic Auth with swashbuckle in OWIN Self Hosted REST API
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2023
05:54 AM
03-13-2023
05:54 AM
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?
Thanks
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2023
07:23 AM
03-13-2023
07:23 AM
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.
