This commit is contained in:
Khushboo Verma committed 2024-03-11 15:51:19 +01:00
1 parent f482d96225
commit c2bdbbe1ec
10 files changed
+80 -16

No files matched your search

+6 -2
View File
@@ -6,14 +6,17 @@ use Utopia\App;
use Appwrite\Extend\Exception;
use Utopia\Database\Document;
use Utopia\Database\Validator\Authorization;
use Utopia\Logger\Log;
App::init()
->groups(['auth'])
->inject('utopia')
->inject('request')
->inject('project')
->action(function (App $utopia, Request $request, Document $project) {
->inject('startTime')
->inject('log')
->action(function (App $utopia, Request $request, Document $project, float $startTime, Log $log) {
$log->addExtra('AuthInitStart', \strval(\microtime(true)));
$route = $utopia->match($request);
$isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles());
@@ -65,4 +68,5 @@ App::init()
throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Unsupported authentication route');
break;
}
$log->addExtra('AuthInitEnd', \strval(\microtime(true)));
});