C
C#2d ago
itay

Thoughts about authorization

I was wondering what your thoughts about different ways of doing authorization? Custom filter Custom middleware .net auth like policy based or other… What are the tradeoffs for simple / complex authorization? Does it matter when it comes In the order of the request? (Before / after middlewares/model binding) Thanks
3 Replies
mg
mg2d ago
I just use ASP.NET's provider for handling the actual JWT <-> claims logic Then I have my own authorization service to determine which users can do what
itay
itayOP2d ago
Where do you enforce those Authorization rules in your app?
mg
mg2d ago
My service has methods that take a user ID and resource ID and return a list of permissions Then I check that list in the endpoint handler

Did you find this page helpful?