79682299

Date: 2025-06-27 17:35:58
Score: 1
Natty:
Report link

I had the same issue as you and referred to this article: Setting up Swagger (ASP.NET Core) using the Authorization headers (Bearer)

SwaggerGen enables a button called Authorize to exist in swagger docs. Once you set the token you can read it in code by putting this line in a controller action result.

var authToken = this.HttpContext.Request.Headers["Authorization"].ToString();

Reasons:
  • Blacklisted phrase (1): this article
  • Whitelisted phrase (-1): I had the same
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user30909924