ASP.NET Core Authorize attribute not working with JWT
问题 I want to implement JWT-based security in ASP.Net Core. All I want it to do, for now, is to read bearer tokens in the Authorization header, and validate them against my criteria. I don't need (and don't want) to include ASP.Net Identity. In fact, I'm trying to avoid using as many of the things that MVC adds in as possible, unless I really need them. I've created a minimal project, which demonstrates the problem. To see the original code, just look through the edit history. I was expecting