'error', 'data' => 'Please authenticate first'], Http::STATUS_UNAUTHORIZED); $res->addHeader('WWW-Authenticate', 'Basic realm="Nextcloud Bookmarks", charset="UTF-8"'); return $res; } } throw $exception; } }