Page MenuHomePhabricator

D5968.id19935.diff
No OneTemporary

D5968.id19935.diff

diff --git a/native/native_rust_library/src/lib.rs b/native/native_rust_library/src/lib.rs
--- a/native/native_rust_library/src/lib.rs
+++ b/native/native_rust_library/src/lib.rs
@@ -13,10 +13,6 @@
use crypto_tools::generate_device_id;
use identity::identity_service_client::IdentityServiceClient;
-use identity_client::{
- get_user_id, login_user_pake, login_user_wallet, register_user,
- verify_user_token,
-};
lazy_static! {
pub static ref RUNTIME: Arc<Runtime> = Arc::new(
@@ -42,18 +38,18 @@
// Identity Service Client
type IdentityClient;
fn initialize_identity_client(addr: String) -> Box<IdentityClient>;
- fn get_user_id_blocking(
+ fn identity_get_user_id_blocking(
client: Box<IdentityClient>,
auth_type: i32,
user_info: String,
) -> Result<String>;
- fn verify_user_token_blocking(
+ fn identity_verify_user_token_blocking(
client: Box<IdentityClient>,
user_id: String,
device_id: String,
access_token: String,
) -> Result<bool>;
- fn register_user_blocking(
+ fn identity_register_user_blocking(
client: Box<IdentityClient>,
user_id: String,
device_id: String,
@@ -61,14 +57,14 @@
password: String,
user_public_key: String,
) -> Result<String>;
- fn login_user_pake_blocking(
+ fn identity_login_user_pake_blocking(
client: Box<IdentityClient>,
user_id: String,
device_id: String,
password: String,
user_public_key: String,
) -> Result<String>;
- fn login_user_wallet_blocking(
+ fn identity_login_user_wallet_blocking(
client: Box<IdentityClient>,
user_id: String,
device_id: String,
@@ -76,6 +72,7 @@
siwe_signature: Vec<u8>,
user_public_key: String,
) -> Result<String>;
+
// Crypto Tools
fn generate_device_id(device_type: DeviceType) -> Result<String>;
}
@@ -95,26 +92,31 @@
}
#[instrument]
-fn get_user_id_blocking(
+fn identity_get_user_id_blocking(
client: Box<IdentityClient>,
auth_type: i32,
user_info: String,
) -> Result<String, Status> {
- RUNTIME.block_on(get_user_id(client, auth_type, user_info))
+ RUNTIME.block_on(identity_client::get_user_id(client, auth_type, user_info))
}
#[instrument]
-fn verify_user_token_blocking(
+fn identity_verify_user_token_blocking(
client: Box<IdentityClient>,
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))
+ RUNTIME.block_on(identity_client::verify_user_token(
+ client,
+ user_id,
+ device_id,
+ access_token,
+ ))
}
#[instrument]
-fn register_user_blocking(
+fn identity_register_user_blocking(
client: Box<IdentityClient>,
user_id: String,
device_id: String,
@@ -122,7 +124,7 @@
password: String,
user_public_key: String,
) -> Result<String, Status> {
- RUNTIME.block_on(register_user(
+ RUNTIME.block_on(identity_client::register_user(
client,
user_id,
device_id,
@@ -133,14 +135,14 @@
}
#[instrument]
-fn login_user_pake_blocking(
+fn identity_login_user_pake_blocking(
client: Box<IdentityClient>,
user_id: String,
device_id: String,
password: String,
user_public_key: String,
) -> Result<String, Status> {
- RUNTIME.block_on(login_user_pake(
+ RUNTIME.block_on(identity_client::login_user_pake(
client,
user_id,
device_id,
@@ -150,7 +152,7 @@
}
#[instrument]
-fn login_user_wallet_blocking(
+fn identity_login_user_wallet_blocking(
client: Box<IdentityClient>,
user_id: String,
device_id: String,
@@ -158,7 +160,7 @@
siwe_signature: Vec<u8>,
user_public_key: String,
) -> Result<String, Status> {
- RUNTIME.block_on(login_user_wallet(
+ RUNTIME.block_on(identity_client::login_user_wallet(
client,
user_id,
device_id,

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 6:16 PM (18 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2678311
Default Alt Text
D5968.id19935.diff (3 KB)

Event Timeline