blob: 8a2f0bc943bbd2d6009c295bcb1b503e77397546 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
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;
}
|