syntax = "proto3"; package idb.user.v1; import "google/protobuf/field_mask.proto"; message User { // The subject of the user returned from Auth0. string subject = 1; // The username of the user's IBD account. optional string ibd_username = 2; // The password of the user's IBD account. // The password is optional because it is never returned from the server. // It is only used when updating a user. optional string ibd_password = 3; } // The user service provides methods for interacting with user data. service UserService { rpc CreateUser(CreateUserRequest) returns (CreateUserResponse); rpc GetUser(GetUserRequest) returns (GetUserResponse); rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse); rpc CheckIBDUsername(CheckIBDUsernameRequest) returns (CheckIBDUsernameResponse); rpc AuthenticateUser(AuthenticateUserRequest) returns (AuthenticateUserResponse); } message CreateUserRequest { string subject = 1; } message CreateUserResponse { User user = 1; } message GetUserRequest { string subject = 1; } message GetUserResponse { User user = 1; } message UpdateUserRequest { User user = 1; google.protobuf.FieldMask update_mask = 2; } message UpdateUserResponse { User user = 1; } message CheckIBDUsernameRequest { string ibd_username = 1; } message CheckIBDUsernameResponse { bool exists = 1; } message AuthenticateUserRequest { string subject = 1; } message AuthenticateUserResponse { bool authenticated = 1; }