I'm trying to develop a simple user authorization mechanism for my application, without using a specific Roles table.
The User entity has a simple Role enum property, and I would like to properly decorate the Authorize
attribute on some controllers.
Maybe I'm missing something here, but how can I let the framework know what is the role of the user when or immediately after he logs in
var result = await _signInManager.PasswordSignInAsync(usr, pwd, false, lockoutOnFailure: false);
and then use the Authorize
attribute?