Page MenuHomePhabricator

D4937.diff
No OneTemporary

D4937.diff

diff --git a/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs b/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs
--- a/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs
+++ b/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs
@@ -120,6 +120,16 @@
)
}
+#[instrument]
+fn verify_user_token_blocking(
+ client: Box<Client>,
+ user_id: String,
+ device_id: String,
+ access_token: String,
+) -> Result<bool, Status> {
+ RUNTIME.block_on(verify_user_token(client, user_id, device_id, access_token))
+}
+
async fn register_user(
mut client: Box<Client>,
user_id: String,
@@ -182,6 +192,25 @@
handle_registration_token_response(message)
}
+#[instrument]
+fn register_user_blocking(
+ client: Box<Client>,
+ user_id: String,
+ device_id: String,
+ username: String,
+ password: String,
+ user_public_key: String,
+) -> Result<String, Status> {
+ RUNTIME.block_on(register_user(
+ client,
+ user_id,
+ device_id,
+ username,
+ password,
+ user_public_key,
+ ))
+}
+
async fn login_user_pake(
mut client: Box<Client>,
user_id: String,
@@ -244,6 +273,16 @@
handle_login_token_response(message)
}
+#[instrument]
+fn login_user_pake_blocking(
+ client: Box<Client>,
+ user_id: String,
+ device_id: String,
+ password: String,
+) -> Result<String, Status> {
+ RUNTIME.block_on(login_user_pake(client, user_id, device_id, password))
+}
+
async fn login_user_wallet(
mut client: Box<Client>,
user_id: String,
@@ -286,6 +325,25 @@
handle_wallet_login_response(message)
}
+#[instrument]
+fn login_user_wallet_blocking(
+ client: Box<Client>,
+ user_id: String,
+ device_id: String,
+ siwe_message: String,
+ siwe_signature: Vec<u8>,
+ user_public_key: String,
+) -> Result<String, Status> {
+ RUNTIME.block_on(login_user_wallet(
+ client,
+ user_id,
+ device_id,
+ siwe_message,
+ siwe_signature,
+ user_public_key,
+ ))
+}
+
fn pake_registration_start(
rng: &mut (impl Rng + CryptoRng),
user_id: String,

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 1:22 AM (21 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2598934
Default Alt Text
D4937.diff (1 KB)

Event Timeline