Changeset View
Changeset View
Standalone View
Standalone View
shared/protos/identity.proto
Show All 20 Lines | service IdentityService { | ||||
// 2. a list of user IDs that are in the supplied list but not in DynamoDB | // 2. a list of user IDs that are in the supplied list but not in DynamoDB | ||||
rpc CompareUsers(CompareUsersRequest) returns (CompareUsersResponse) {} | rpc CompareUsers(CompareUsersRequest) returns (CompareUsersResponse) {} | ||||
// Called by clients to get a nonce for a Sign-In with Ethereum message | // Called by clients to get a nonce for a Sign-In with Ethereum message | ||||
rpc GenerateNonce(GenerateNonceRequest) returns (GenerateNonceResponse) {} | rpc GenerateNonce(GenerateNonceRequest) returns (GenerateNonceResponse) {} | ||||
// Called by clients to get session initialization info needed to open a new | // Called by clients to get session initialization info needed to open a new | ||||
// channel of communication with a given user | // channel of communication with a given user | ||||
rpc GetSessionInitializationInfo(GetSessionInitializationInfoRequest) returns | rpc GetSessionInitializationInfo(GetSessionInitializationInfoRequest) returns | ||||
(GetSessionInitializationInfoResponse) {} | (GetSessionInitializationInfoResponse) {} | ||||
rpc UpdateUser(stream UpdateUserRequest) returns | |||||
(stream UpdateUserResponse) {} | |||||
} | } | ||||
// Helper types | // Helper types | ||||
message PakeRegistrationRequestAndUserID { | message PakeRegistrationRequestAndUserID { | ||||
string userID = 1; | string userID = 1; | ||||
// ed25519 key for the given user's device | // ed25519 key for the given user's device | ||||
string signingPublicKey = 2; | string signingPublicKey = 2; | ||||
▲ Show 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | |||||
message GetSessionInitializationInfoRequest { | message GetSessionInitializationInfoRequest { | ||||
string userID = 1; | string userID = 1; | ||||
} | } | ||||
message GetSessionInitializationInfoResponse { | message GetSessionInitializationInfoResponse { | ||||
// Map is keyed on devices' public ed25519 key used for signing | // Map is keyed on devices' public ed25519 key used for signing | ||||
map<string, SessionInitializationInfo> devices = 1; | map<string, SessionInitializationInfo> devices = 1; | ||||
} | } | ||||
// UpdateUser | |||||
// Messages sent from a client to Identity Service | |||||
message UpdateUserRequest { | |||||
oneof data { | |||||
// Only need user information on initial call, subsequent PAKE commands | |||||
// can infer parameters from first Request + userID | |||||
PakeRegistrationRequestAndUserID request = 1; | |||||
// We combine the last step of PAKE registration with the first step of PAKE | |||||
// login here to reduce the number of messages sent | |||||
PakeRegistrationUploadAndCredentialRequest | |||||
pakeRegistrationUploadAndCredentialRequest = 2; | |||||
bytes pakeLoginFinalizationMessage = 4; | |||||
} | |||||
} | |||||
// Messages sent from Identity Service to a client | |||||
message UpdateUserResponse { | |||||
oneof data { | |||||
bytes pakeRegistrationResponse = 1; | |||||
PakeLoginResponse pakeLoginResponse = 2; | |||||
} | |||||
} |