Open veneliniliev opened 2 years ago
Hi. I'm not sure I understand the use case. How would we know which authorizer to use?
I want to use both at the same time. if I use middleware I can't access the resource/type and the other benefits I have directly in the authorizer.
My point is that the JSON:API implementation looks up the authoriser and automatically executes the functions on it. How would we know which authorizer to use if there are two?
first executes one, if successful executes the second as well. in the old version, I could have one in the resource and one from the routing like ->authorizer() and working.
in the new version, there is LaravelJsonApi::registerAuthorizer but I can't add two (or more) authorizers to run sequentially
ah ok, in the old version I don't think I intentionally supported two authorisers working: it looks like an accidental benefit of how I implemented it.
I'll have a think how this could be supported.
can I register 2 authorizers of one Schema?
example:
2 authorizers have very different logic and are used in different schemas