From 05256fef943f9bdb4f2f1ca669c246a7cbdb281f Mon Sep 17 00:00:00 2001 From: philippe44 Date: Tue, 25 Jul 2023 21:31:06 -0700 Subject: [PATCH] add login5 proto files - release --- .../spotify/cspot/protobuf/login5.options | 1 + .../spotify/cspot/protobuf/login5.proto | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 components/spotify/cspot/protobuf/login5.options create mode 100644 components/spotify/cspot/protobuf/login5.proto diff --git a/components/spotify/cspot/protobuf/login5.options b/components/spotify/cspot/protobuf/login5.options new file mode 100644 index 00000000..55fea60e --- /dev/null +++ b/components/spotify/cspot/protobuf/login5.options @@ -0,0 +1 @@ +LoginOk.access_token type: FT_POINTER \ No newline at end of file diff --git a/components/spotify/cspot/protobuf/login5.proto b/components/spotify/cspot/protobuf/login5.proto new file mode 100644 index 00000000..e795d84a --- /dev/null +++ b/components/spotify/cspot/protobuf/login5.proto @@ -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; +} \ No newline at end of file