A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
SwaggerBasicAuthMiddleware for securing swagger docs does not work with jwt authorize authentication
Good day guys,
I have been trying to secure swagger docs using SwaggerBasicAuthMiddleware where it will authenticate the user before accessing the documentation and viewing of the methods. This part does work well. But the other part where i want to use jwt for accessing the methods and sending of post requests. Does not work having both. if i remove the SwaggerBasicAuthMiddleware for authentication of swagger ui. It starts to work with jwt and i can send request and get the token.
for example this is the secured part which works well.
But after accessing the the docs and methods. The authentication method to authorize the api with jwt does not work.
any help will be appreciated
thank you
Developer technologies | ASP.NET Core | Other
Developer technologies | ASP.NET Core | ASP.NET API
A component of ASP.NET Core for creating RESTful web services that support HTTP-based communication between clients and servers.
1 answer
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
3 deleted comments
Comments have been turned off. Learn more