C# API Conttoller & Auth Policies
# package-development
w
C# API Controllers & Auth Policies?
Should I be creating an Auth Policy with my API for my package? Just seems a fair bit of plumbing/scaffolding in order to decorate my own API? Or do I just put the logic I need direct into the controller.
j
you can use the auth policies from the management api if you want
w
Doesn’t meet my needs. As it needs to lookup the user group from appsettings.
So I can do the logic in the controller pretty easy or do the plumbing to do the Auth policy.
j
guess it depends if you want to reuse it or not
w
Yeh may not and doubt anyone else who installs it would want to reuse it. Ok I’m sold. Will go the quicker route 🙂
2 Views