diff --git a/services/identity/src/client_service.rs b/services/identity/src/client_service.rs --- a/services/identity/src/client_service.rs +++ b/services/identity/src/client_service.rs @@ -6,14 +6,14 @@ use crate::{ client_service::client_proto::{ - DeleteUserRequest, Empty, GenerateNonceResponse, KeyserverKeysRequest, - KeyserverKeysResponse, OpaqueLoginFinishRequest, OpaqueLoginFinishResponse, + DeleteUserRequest, Empty, GenerateNonceResponse, InboundKeysForUserRequest, + InboundKeysForUserResponse, KeyserverKeysRequest, KeyserverKeysResponse, + OpaqueLoginFinishRequest, OpaqueLoginFinishResponse, OpaqueLoginStartRequest, OpaqueLoginStartResponse, - ReceiverKeysForUserRequest, ReceiverKeysForUserResponse, + OutboundKeysForUserRequest, OutboundKeysForUserResponse, RefreshUserPreKeysRequest, RegistrationFinishRequest, RegistrationFinishResponse, RegistrationStartRequest, - RegistrationStartResponse, SenderKeysForUserRequest, - SenderKeysForUserResponse, UpdateUserPasswordFinishRequest, + RegistrationStartResponse, UpdateUserPasswordFinishRequest, UpdateUserPasswordStartRequest, UpdateUserPasswordStartResponse, UploadOneTimeKeysRequest, VerifyUserAccessTokenRequest, VerifyUserAccessTokenResponse, WalletLoginRequest, WalletLoginResponse, @@ -595,17 +595,17 @@ } } - async fn get_receiver_keys_for_user( + async fn get_outbound_keys_for_user( &self, - _request: tonic::Request, - ) -> Result, tonic::Status> { + _request: tonic::Request, + ) -> Result, tonic::Status> { unimplemented!(); } - async fn get_sender_keys_for_user( + async fn get_inbound_keys_for_user( &self, - _request: tonic::Request, - ) -> Result, tonic::Status> { + _request: tonic::Request, + ) -> Result, tonic::Status> { unimplemented!(); } diff --git a/shared/protos/identity_client.proto b/shared/protos/identity_client.proto --- a/shared/protos/identity_client.proto +++ b/shared/protos/identity_client.proto @@ -42,12 +42,12 @@ // - Identity keys // - PreKey (including preKey signature) // - One-time PreKey - rpc GetReceiverKeysForUser(ReceiverKeysForUserRequest) returns - (ReceiverKeysForUserResponse) {} + rpc GetOutboundKeysForUser(OutboundKeysForUserRequest) returns + (OutboundKeysForUserResponse) {} // Called by receivers of a communication request. The reponse will only // return identity and prekeys per device, but will not contain one-time keys. - rpc GetSenderKeysForUser(SenderKeysForUserRequest) returns - (SenderKeysForUserResponse) {} + rpc GetInboundKeysForUser(InboundKeysForUserRequest) returns + (InboundKeysForUserResponse) {} // Called by clients to get required keys for opening a connection // to a keyserver rpc GetKeyserverKeys(KeyserverKeysRequest) returns @@ -230,10 +230,10 @@ string nonce = 1; } -// GetReceiverKeysForUser +// GetOutboundKeysForUser // Information needed when establishing communication to someone else's device -message ReceiverKeyInfo { +message OutboundKeyInfo { IdentityKeyInfo identityInfo = 1; PreKey identityPrekey = 2; PreKey notifPrekey = 3; @@ -244,36 +244,36 @@ // Information needed by a device to establish communcation when responding // to a request. // The device receiving a request only needs the identity and prekeys. -message ReceiverKeysForUserRequest { +message OutboundKeysForUserRequest { oneof identifier { string username = 1; string walletAddress = 2; } } -message ReceiverKeysForUserResponse { +message OutboundKeysForUserResponse { // Map is keyed on devices' public ed25519 key used for signing - map devices = 1; + map devices = 1; } -// GetSenderKeysForUser +// GetInboundKeysForUser -message SenderKeyInfo { +message InboundKeyInfo { IdentityKeyInfo identityInfo = 1; PreKey identityPrekey = 2; PreKey notifPrekey = 3; } -message SenderKeysForUserRequest { +message InboundKeysForUserRequest { oneof identifier { string username = 1; string walletAddress = 2; } } -message SenderKeysForUserResponse { +message InboundKeysForUserResponse { // Map is keyed on devices' public ed25519 key used for signing - map devices = 1; + map devices = 1; } // GetKeyserverKeys