Use Custom Attributes with ASP.NET Identity

So recently i got into ASP.NET Identity with all the auth stuff so i can write more robust backend software
But now i have a question, the way id like to handle permissions for users is by enabling scopes on them for example
account.manage
or
profile.view
for example, now in my backend id like to have have a middleware/attribute like
[RequireScope("account.manage")]
which uses the Authenticated user to see its scopes
so now i have 2 questions
  1. is it even a good idea to do it like that, if no what are my alternatives?
  2. how can i implement this properly
Was this page helpful?