I am configuring Swagger for OAuth 2.0 in my .NET application using NSwag. My setup currently relies on client secret for authentication, but my application uses a certificate instead of a client secret for OAuth 2.0.a
How can I modify my Swagger configuration to work with a certificate for OAuth 2.0 authentication instead of using a client secret? Any guidance on how to implement this would be greatly appreciated!
What I tried: I attempted to configure Swagger using the standard OAuth 2.0 setup, following the NSwag documentation for JWT and API key authentication. However, I replaced the client secret with a certificate for authentication.
What I expected: I expected the Swagger UI to allow me to authenticate using the certificate and access the protected API endpoints successfully.
What actually resulted: Instead of successfully authenticating, I encountered errors related to the missing client secret, and the Swagger UI did not recognize the certificate as a valid authentication method.