You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
1.1 KiB
69 lines
1.1 KiB
syntax = "proto3";
|
|
|
|
package users;
|
|
|
|
option go_package = "git.chrishayward.xyz/x/users/proto";
|
|
|
|
service Users {
|
|
rpc Register (RegisterRequest) returns (RegisterResponse) {}
|
|
rpc Login (LoginRequest) returns (LoginResponse) {}
|
|
rpc Authorize (AuthorizeRequest) returns (AuthorizeResponse) {}
|
|
rpc ChangePassword (ChangePasswordRequest) returns (ChangePasswordResponse) {}
|
|
rpc ResetPassword (ResetPasswordReqeust) returns (ResetPasswordResponse) {}
|
|
}
|
|
|
|
message UserForm {
|
|
string email = 1;
|
|
optional string password = 2;
|
|
optional string password_again = 3;
|
|
}
|
|
|
|
message UserToken {
|
|
string token = 1;
|
|
optional int64 expires = 2;
|
|
}
|
|
|
|
message UserInfo {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message RegisterRequest {
|
|
UserForm form = 1;
|
|
}
|
|
|
|
message RegisterResponse {
|
|
|
|
}
|
|
|
|
message LoginRequest {
|
|
UserForm form = 1;
|
|
}
|
|
|
|
message LoginResponse {
|
|
UserToken token = 1;
|
|
}
|
|
|
|
message AuthorizeRequest {
|
|
string secret = 1;
|
|
UserToken token = 2;
|
|
}
|
|
|
|
message AuthorizeResponse {
|
|
UserInfo user = 1;
|
|
}
|
|
|
|
message ChangePasswordRequest {
|
|
UserForm form = 1;
|
|
}
|
|
|
|
message ChangePasswordResponse {
|
|
|
|
}
|
|
|
|
message ResetPasswordReqeust {
|
|
UserForm form = 1;
|
|
}
|
|
|
|
message ResetPasswordResponse {
|
|
|
|
}
|