I can see that it's the default implementation for the guards, but I think this should be more generic. Perhaps a strategy adaptor for forwarding the method calls? This way you're not tied to a particular authorization solution, simply relying on one being provided.
Further to that, if no authorization is available, you can default to an always allow state.
I can see that it's the default implementation for the guards, but I think this should be more generic. Perhaps a strategy adaptor for forwarding the method calls? This way you're not tied to a particular authorization solution, simply relying on one being provided.
Further to that, if no authorization is available, you can default to an always allow state.