© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
19 replies
The Fog from Human Resources

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
account.manage
or
profile.view
profile.view
for example, now in my backend id like to have have a middleware/attribute like
[RequireScope("account.manage")]
[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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

ASP.NET Identity or custom?
C#CC# / help
3y ago
ASP.NET Core Identity?
C#CC# / help
3y ago
Combining attributes ASP.NET Core
C#CC# / help
4y ago