I am trying to get the [Authroize] tag working on .NET Core 2.1 Web API project built on .NET Framework. There is no IAppBuilder.UseAuthorization(). I wrote my own JWT custom auth handler and tried the following in the Startup:
services.AddAuthentication("Basic")
.AddScheme<BasicAuthenticationOptions, EdcAuthenticationHandler>("Basic", null);
services.AddAuthorization();
I also have
app.UseAuthentication();
but, again, there is no app.UseAuthorization()
I want to be able to add [Authorize] attributes (with roles as well) and be able to access the User object inside my controller methods.
Any insight would be appreciated.