Added token generation, user activation command and response.

This commit is contained in:
Fabio Bas 2015-05-24 00:37:45 +02:00
parent 42796b0d0e
commit ff1aed717e
19 changed files with 223 additions and 19 deletions

View file

@ -114,6 +114,7 @@ SET(PROTO_FILES
isl_message.proto
moderator_commands.proto
move_card_to_zone.proto
response_activate.proto
response_deck_download.proto
response_deck_list.proto
response_deck_upload.proto

View file

@ -32,6 +32,9 @@ message Response {
RespAccountNotActivated = 28; // Client attempted to log into a registered username but the account hasn't been activated
RespRegistrationDisabled = 29; // Server does not allow clients to register
RespRegistrationFailed = 30; // Server accepted a reg request but failed to perform the registration
RespActivationAccepted = 31; // Server accepted a reg user activation token
RespActivationFailed = 32; // Server didn't accept a reg user activation token
RespRegistrationAcceptedNeedsActivation = 33; // Server accepted cient registration, but it will need token activation
}
enum ResponseType {
JOIN_ROOM = 1000;
@ -44,6 +47,7 @@ message Response {
DECK_DOWNLOAD = 1007;
DECK_UPLOAD = 1008;
REGISTER = 1009;
ACTIVATE = 1010;
REPLAY_LIST = 1100;
REPLAY_DOWNLOAD = 1101;
}

View file

@ -0,0 +1,7 @@
import "response.proto";
message Response_Activate {
extend Response {
optional Response_Activate ext = 1010;
}
}

View file

@ -19,6 +19,7 @@ message SessionCommand {
LIST_ROOMS = 1014;
JOIN_ROOM = 1015;
REGISTER = 1016;
ACTIVATE = 1017;
REPLAY_LIST = 1100;
REPLAY_DOWNLOAD = 1101;
REPLAY_MODIFY_MATCH = 1102;
@ -115,3 +116,14 @@ message Command_Register {
optional string country = 5;
optional string real_name = 6;
}
// User wants to activate an account
message Command_Activate {
extend SessionCommand {
optional Command_Activate ext = 1017;
}
// User name client wants to activate
required string user_name = 1;
// Activation token
required string token = 2;
}