Authenticated REST API for a mobile app and website on ASP.NET Core with OpenIdConnect
问题 I have a pretty much boilerplate "ASP.NET Core Web Application (.NET Framework)" application, that should become a REST API, to be hosted on Azure, for use for a website & mobile app. I want to equip it with token authentication through the headers, and I have chosen for the OpenIdConnect package. I have copypasted the snippets from this page (https://github.com/aspnet-contrib/AspNet.Security.OpenIdConnect.Server) into my template, and added the app.UseOAuthValidation() call, so the code