Closed n00dl3s closed 1 year ago
Was able to resolve this by adding.
c.AddSecurityDefinition("Bearer", new ApiKeyScheme { In = "header", Description = "Please insert JWT with Bearer into field", Name = "Authorization", Type = "apiKey" }); c.AddSecurityRequirement(new Dictionary<string, IEnumerable<string>> { { "Bearer", new string[] { } } });
And getting the Bearer key in the debug console, after logging in through the password flow in swagger.
Is there a better way to do this?
plz howa u test swagger api
When using Swagger to test routes, any authorized route will return a 401.