Add middlewares

$app[‘guard.credentialized’]($credential1, $andCredential2, …);
$app[‘guard.redirect_on’]($responseStatusCode, $pathName);
$app[‘guard.redirect_on’]($responseStatusCode, $pathName,
$pathArguments);
$app[‘guard.redirect_on’]($responseStatusCode,
$callbackWhichReturnResponse);
Add middleware

$app[‘only_authenticated’] is same as ‘must_be_authenticated’ except it
throw un 401 response instead of returning a RedirectResponse to ‘login’