I tried to post this question earlier, but my post seems to have gone missing somewhere as it has not appeared ?
I am currently testing out an API for a third-party service, their example PHP scripts use bramus/router as PHP router.
One thing that bramus/router appears to support that aura/router does not is the concept of "before" checks, like this example given :
// Check JWT on /secured routes
$router->before('GET', '/secured/.*', function() use ($app) {
$requestHeaders = apache_request_headers();
if (!isset($requestHeaders['Authorization'])) {
header('HTTP/1.0 401 Unauthorized');
echo "No token provided.";
exit();
}
i.e. in this instance, bramus/router checks JWT token authentication before proceeding any further.
Does this concept exist in aura/router (I can't seem to find it in the docs) or do I just hope it will be forthcoming in the future ?
Thanks
TIm