You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the default callback is set to a 401 response, it might be handy to make this configurable so an implementor won't have to add the same callback to his routes a 100 times
The text was updated successfully, but these errors were encountered:
I have worked on the default configuration implementation, the implementation is now located in the config-defaults branch.
The current tests are passing, i have not added tests for the implementation but i'll be sure to add those later.
The configuration now looks like this:
'callbacks' => [
// 'myCallback' => 'MyClass::myFunction',
],
'defaults' => [
'RULE' => 'allow', //Can be either `allow` or `deny`, anything else will set this to `deny` automatically.'CALLBACK' => [
'name' => 'orUnauthorized',
'args' => null
],
]
Adding a default rule doesn't add anything except overhead (unless I'm missing something), I think the general way of defining the default callback should be changed as well. I think we should fix the various callback issues (allowing instance methods for instance), before we tackle this issue
Currently the default callback is set to a 401 response, it might be handy to make this configurable so an implementor won't have to add the same callback to his routes a 100 times
The text was updated successfully, but these errors were encountered: