ASP.Net Core MVC/API/SignalR - Change authentication schemes (Cookie & JWT)
问题 I've a .Net Core 2.2 web application MVC in which I've added API controllers and SignalR hubs. On the other side, I've a mobile app that calls the hub methods. Before calling hubs from the app, I am authenticating my users through an API call - getting back a JWT Token - and using this token for future requests, this way I can use Context.User.Identity.Name in my hub methods: public static async Task<string> GetValidToken(string userName, string password) { using (var client = new HttpClient(