Closed drchav closed 7 years ago
Hi! Because it's so quick to configure, and so important to configure just the same - I recommend via implementation, foregoing any special exception mechanisms that could lead to trouble down the road. This is the stuff of breaches, in my opinion, but I am a paranoid fellow! :)
It also ensures a single way of doing things - which is important.
In this module, the full controller name is truly the key that controls guards.
The problem is as I'm using some apigility things in this project, I only need the APIs to be totally exposed and I'm having some difficulties to implement the guards with apigility routes.
I've admittedly never tried using them in concert. Defining the rules for the Apigility controller that handles the request, doesn't work?
No I got always the same error: Fatal error: Uncaught TypeError: Argument 2 passed to CirclicalUser\Service\AccessService::requiresAuthentication() must be of the type string, null given, called in /Users/danielchaves/Rocket/TagRocket/System/vendor/saeven/zf3-circlical-user/src/CirclicalUser/Listener/AccessListener.php on line 52 and defined in /Users/danielchaves/Rocket/TagRocket/System/vendor/saeven/zf3-circlical-user/src/CirclicalUser/Service/AccessService.php on line
and I have this on the module config:
'circlical' => [ 'user' => [ 'guards' => [ 'ModuleName' => [ "controllers" => [ \TagRocketAPI\V1\Rest\Beacons\BeaconsResource::class => [ 'default' => [''], ], ],
],
],
],
Those are drawn from the route's controller and action names.
Possible that Apigility does not pass these? I understood they were required for dispatch.
Apigility do not pass a action just the controller, I will adapt this module to my needs thanks for your help.
I could easily rig something that relies on a "Controller" default rather than Module default.
@drchav with zend-mvc's recent support for middleware definitions, I'd like to add this in. Were you using this with Expressive?
There is anyway that I can Disable the guard for a entire module?