Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3301801
D3143.id9484.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3143.id9484.diff
View Options
diff --git a/native/cpp/CommonCpp/grpc/Client.h b/native/cpp/CommonCpp/grpc/Client.h
--- a/native/cpp/CommonCpp/grpc/Client.h
+++ b/native/cpp/CommonCpp/grpc/Client.h
@@ -46,6 +46,8 @@
void setOnCloseCallback(std::function<void()> callback);
void closeGetStream();
void assignSetReadyStateCallback(std::function<void(SocketStatus)> callback);
+
+ std::string sessionSignature(std::string deviceID);
};
} // namespace network
diff --git a/native/cpp/CommonCpp/grpc/Client.cpp b/native/cpp/CommonCpp/grpc/Client.cpp
--- a/native/cpp/CommonCpp/grpc/Client.cpp
+++ b/native/cpp/CommonCpp/grpc/Client.cpp
@@ -127,5 +127,18 @@
this->clientGetReadReactor->assignSetReadyStateCallback(callback);
}
+std::string Client::sessionSignature(std::string deviceID) {
+ grpc::ClientContext context;
+ tunnelbroker::SessionSignatureRequest request;
+ tunnelbroker::SessionSignatureResponse response;
+
+ request.set_deviceid(deviceID);
+ auto status{this->stub_->SessionSignature(&context, request, &response)};
+ if (!status.ok()) {
+ return std::string{};
+ }
+ return response.tosign();
+}
+
} // namespace network
} // namespace comm
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 4:19 AM (21 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2536577
Default Alt Text
D3143.id9484.diff (1 KB)
Attached To
Mode
D3143: [CommCoreModule] Fill out `sessionSignature(deviceID) => toSign` boilerplate in `Client`
Attached
Detach File
Event Timeline
Log In to Comment