PalacePal/Pal.Common/Protos/account.proto

66 lines
1.3 KiB
Protocol Buffer
Raw Permalink Normal View History

syntax = "proto3";
package account;
service AccountService {
// Accounts are a way to distinguish different players.
//
// Their primary purpose is tracking who has seen a trap/coffer appear to ensure reliability,
// as well as allowing some basic protection against garabage data.
//
// We never store any character data/xiv account data in an account.
rpc CreateAccount(CreateAccountRequest) returns (CreateAccountReply);
rpc Login(LoginRequest) returns (LoginReply);
// Ensures that the auth token we use is valid in calls.
rpc Verify(VerifyRequest) returns (VerifyReply);
}
message CreateAccountRequest {
2023-10-03 20:05:19 +00:00
Version version = 1;
}
message CreateAccountReply {
bool success = 1;
string accountId = 2;
CreateAccountError error = 3;
}
enum CreateAccountError {
CREATE_ACCOUNT_ERROR_NONE = 0;
CREATE_ACCOUNT_ERROR_UNKNOWN = 1;
CREATE_ACCOUNT_ERROR_UPGRADE_REQUIRED = 2;
CREATE_ACCOUNT_ERROR_INVALID_HASH = 3;
}
message LoginRequest {
string accountId = 1;
2023-10-03 20:05:19 +00:00
Version version = 2;
}
message LoginReply {
bool success = 1;
string authToken = 2;
2022-12-22 01:03:54 +00:00
reserved 3; // expiresAt
2022-10-23 20:57:35 +00:00
LoginError error = 4;
}
enum LoginError {
LOGIN_ERROR_NONE = 0;
LOGIN_ERROR_UNKNOWN = 1;
LOGIN_ERROR_INVALID_ACCOUNT_ID = 2;
LOGIN_ERROR_UPGRADE_REQUIRED = 3;
}
message VerifyRequest {
}
message VerifyReply {
2023-10-03 20:05:19 +00:00
}
message Version {
int32 major = 1;
int32 minor = 2;
}