add login5 proto files - release

This commit is contained in:
philippe44
2023-07-25 21:31:06 -07:00
parent bc6e25c85c
commit 05256fef94
2 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1 @@
LoginOk.access_token type: FT_POINTER

View File

@@ -0,0 +1,42 @@
// A minimal set of protobuf messages required to auth through login5, with a stored credential.
message StoredCredential {
required string username = 1;
required bytes data = 2;
}
message ClientInfo {
required string client_id = 1;
required string device_id = 2;
}
message LoginRequest {
required ClientInfo client_info = 1;
oneof login_method {
StoredCredential stored_credential = 100;
}
}
message LoginOk {
required string access_token = 2;
optional int32 access_token_expires_in = 4;
}
message LoginResponse {
oneof response {
LoginOk ok = 1;
LoginError error = 2;
}
}
enum LoginError {
UNKNOWN_ERROR = 0;
INVALID_CREDENTIALS = 1;
BAD_REQUEST = 2;
UNSUPPORTED_LOGIN_PROTOCOL = 3;
TIMEOUT = 4;
UNKNOWN_IDENTIFIER = 5;
TOO_MANY_ATTEMPTS = 6;
INVALID_PHONENUMBER = 7;
TRY_AGAIN_LATER = 8;
}