From 4e4138f17f9c04c3b1667903c58c57b475cf1258 Mon Sep 17 00:00:00 2001 From: caton-hpg <87342612+caton-hpg@users.noreply.github.com> Date: Fri, 26 Apr 2024 14:05:52 +0800 Subject: [PATCH] fix auth for scan --- include/nebula/sclient/StorageClient.h | 2 -- src/sclient/StorageClient.cpp | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/nebula/sclient/StorageClient.h b/include/nebula/sclient/StorageClient.h index d80be7c..d97f4b1 100644 --- a/include/nebula/sclient/StorageClient.h +++ b/include/nebula/sclient/StorageClient.h @@ -81,7 +81,6 @@ class StorageClient { std::string filter = "", bool onlyLatestVersion = false, bool enableReadFromFollower = true, - bool needAuth = false, const std::string& username = "", const std::string& password = ""); @@ -96,7 +95,6 @@ class StorageClient { std::string filter = "", bool onlyLatestVersion = false, bool enableReadFromFollower = true, - bool needAuth = false, const std::string& username = "", const std::string& password = ""); diff --git a/src/sclient/StorageClient.cpp b/src/sclient/StorageClient.cpp index d8b3bc5..a431fb4 100644 --- a/src/sclient/StorageClient.cpp +++ b/src/sclient/StorageClient.cpp @@ -51,7 +51,6 @@ ScanEdgeIter StorageClient::scanEdgeWithPart(std::string spaceName, std::string filter, bool onlyLatestVersion, bool enableReadFromFollower, - bool needAuth, const std::string& username, const std::string& password) { auto spaceIdResult = mClient_->getSpaceIdByNameFromCache(spaceName); @@ -84,7 +83,7 @@ ScanEdgeIter StorageClient::scanEdgeWithPart(std::string spaceName, req->set_filter(filter); req->set_only_latest_version(onlyLatestVersion); req->set_enable_read_from_follower(enableReadFromFollower); - req->set_need_authenticate(needAuth); + req->set_need_authenticate(true); req->set_username(username); req->set_password(password); @@ -125,7 +124,6 @@ ScanVertexIter StorageClient::scanVertexWithPart( std::string filter, bool onlyLatestVersion, bool enableReadFromFollower, - bool needAuth, const std::string& username, const std::string& password) { auto spaceIdResult = mClient_->getSpaceIdByNameFromCache(spaceName); @@ -164,7 +162,7 @@ ScanVertexIter StorageClient::scanVertexWithPart( req->set_filter(filter); req->set_only_latest_version(onlyLatestVersion); req->set_enable_read_from_follower(enableReadFromFollower); - req->set_need_authenticate(needAuth); + req->set_need_authenticate(true); req->set_username(username); req->set_password(password);