浏览代码

add login5 proto files - release

philippe44 1 年之前
父节点
当前提交
05256fef94
共有 2 个文件被更改,包括 43 次插入0 次删除
  1. 1 0
      components/spotify/cspot/protobuf/login5.options
  2. 42 0
      components/spotify/cspot/protobuf/login5.proto

+ 1 - 0
components/spotify/cspot/protobuf/login5.options

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

+ 42 - 0
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;
+}