Mattarmstrong78
4 years agoNew Member
JWT Token Authentication 401 Undocumented
I've been working on an API using swashbuckle.AspNetCore as a NuGet package and have JWT authentication before a user is allowed to use any of the Get requests to the queries. The application is a C# .NET 5.0 web API with swashbuckle 6.2.1 installed. The API will produce a token when the correct login credentials are given and will authenticate the token without any problems. But, the [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] authentication method above my Database controller wont receive the authentication. So, after authentication logs the user in the query requests all produce a "401-Undocumented" response. I've been looking at this problem for two days now. Any advice would be greatly appreciated.