Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33308054
D5968.1768800429.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D5968.1768800429.diff
View Options
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
@@ -12,10 +12,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(
@@ -41,18 +37,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,
@@ -60,14 +56,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,
@@ -75,6 +71,7 @@
siwe_signature: Vec<u8>,
user_public_key: String,
) -> Result<String>;
+
// Crypto Tools
fn generate_device_id(device_type: DeviceType) -> Result<String>;
}
@@ -94,26 +91,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,
@@ -121,7 +123,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,
@@ -132,14 +134,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,
@@ -149,7 +151,7 @@
}
#[instrument]
-fn login_user_wallet_blocking(
+fn identity_login_user_wallet_blocking(
client: Box<IdentityClient>,
user_id: String,
device_id: String,
@@ -157,7 +159,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
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 5:27 AM (6 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5954587
Default Alt Text
D5968.1768800429.diff (3 KB)
Attached To
Mode
D5968: [native/rust_library] Refactor Tonic client utility function names for Identity service
Attached
Detach File
Event Timeline
Log In to Comment