$params */ public function show(array $params = []): Response { $guard = $this->sessionGuard()->check(); if (!$guard->authenticated || $guard->userId === null || $guard->roleId === null) { return $this->json( ['data' => null, 'error' => ['code' => 'AUTH_REQUIRED', 'message' => 'Authentification requise']], 401, ); } $authorizer = $this->authorizer(); return $this->json([ 'data' => [ 'user_id' => $guard->userId, 'role_id' => $guard->roleId, 'role_code' => $authorizer->roleCode($guard->roleId), 'permissions' => $authorizer->permissionsFor($guard->roleId), ], ]); } }