Hi, I am using chadicus/oauth to put oauth scopes around my paths. It works great, but I created a route to get all routes and their scopes. The problem is when I iterate through a Route and its RouteGroups and get the middleware, they are all DeferredCallable instances and the internal $callable is private. Can you please add a public getter for the callable so that I can get the actual Middleware that was added please? This way I can get the scopes from the Authorization middleware in chadicus/slim-oauth2-middleware.
Thanks much!
P.S. Yes I know that I will need to pass an array by instance through this function to get the scopes; this is just a proof of concept.
private function _getScopes( Routable $r ) {
foreach ($r->getMiddleware() as $m) {
// $m is a DeferredCallable and I can't get the private callable!!!
echo $m instanceof Authorization ? 'yes' : 'no';
}
if($r instanceof Route) {
foreach($r->getGroups() as $g)
$this->_getScopes($g);
}
}