authentication.proto 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. syntax = "proto2";
  2. message ClientResponseEncrypted {
  3. required LoginCredentials login_credentials = 0xa;
  4. optional AccountCreation account_creation = 0x14;
  5. optional FingerprintResponseUnion fingerprint_response = 0x1e;
  6. optional PeerTicketUnion peer_ticket = 0x28;
  7. required SystemInfo system_info = 0x32;
  8. optional string platform_model = 0x3c;
  9. optional string version_string = 0x46;
  10. optional LibspotifyAppKey appkey = 0x50;
  11. optional ClientInfo client_info = 0x5a;
  12. }
  13. message LoginCredentials {
  14. optional string username = 0xa;
  15. required AuthenticationType typ = 0x14;
  16. optional bytes auth_data = 0x1e;
  17. }
  18. enum AuthenticationType {
  19. AUTHENTICATION_USER_PASS = 0x0;
  20. AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS = 0x1;
  21. AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS = 0x2;
  22. AUTHENTICATION_SPOTIFY_TOKEN = 0x3;
  23. AUTHENTICATION_FACEBOOK_TOKEN = 0x4;
  24. }
  25. enum AccountCreation {
  26. ACCOUNT_CREATION_ALWAYS_PROMPT = 0x1;
  27. ACCOUNT_CREATION_ALWAYS_CREATE = 0x3;
  28. }
  29. message FingerprintResponseUnion {
  30. optional FingerprintGrainResponse grain = 0xa;
  31. optional FingerprintHmacRipemdResponse hmac_ripemd = 0x14;
  32. }
  33. message FingerprintGrainResponse {
  34. required bytes encrypted_key = 0xa;
  35. }
  36. message FingerprintHmacRipemdResponse {
  37. required bytes hmac = 0xa;
  38. }
  39. message PeerTicketUnion {
  40. optional PeerTicketPublicKey public_key = 0xa;
  41. optional PeerTicketOld old_ticket = 0x14;
  42. }
  43. message PeerTicketPublicKey {
  44. required bytes public_key = 0xa;
  45. }
  46. message PeerTicketOld {
  47. required bytes peer_ticket = 0xa;
  48. required bytes peer_ticket_signature = 0x14;
  49. }
  50. message SystemInfo {
  51. required CpuFamily cpu_family = 0xa;
  52. optional uint32 cpu_subtype = 0x14;
  53. optional uint32 cpu_ext = 0x1e;
  54. optional Brand brand = 0x28;
  55. optional uint32 brand_flags = 0x32;
  56. required Os os = 0x3c;
  57. optional uint32 os_version = 0x46;
  58. optional uint32 os_ext = 0x50;
  59. optional string system_information_string = 0x5a;
  60. optional string device_id = 0x64;
  61. }
  62. enum CpuFamily {
  63. CPU_UNKNOWN = 0x0;
  64. CPU_X86 = 0x1;
  65. CPU_X86_64 = 0x2;
  66. CPU_PPC = 0x3;
  67. CPU_PPC_64 = 0x4;
  68. CPU_ARM = 0x5;
  69. CPU_IA64 = 0x6;
  70. CPU_SH = 0x7;
  71. CPU_MIPS = 0x8;
  72. CPU_BLACKFIN = 0x9;
  73. }
  74. enum Brand {
  75. BRAND_UNBRANDED = 0x0;
  76. BRAND_INQ = 0x1;
  77. BRAND_HTC = 0x2;
  78. BRAND_NOKIA = 0x3;
  79. }
  80. enum Os {
  81. OS_UNKNOWN = 0x0;
  82. OS_WINDOWS = 0x1;
  83. OS_OSX = 0x2;
  84. OS_IPHONE = 0x3;
  85. OS_S60 = 0x4;
  86. OS_LINUX = 0x5;
  87. OS_WINDOWS_CE = 0x6;
  88. OS_ANDROID = 0x7;
  89. OS_PALM = 0x8;
  90. OS_FREEBSD = 0x9;
  91. OS_BLACKBERRY = 0xa;
  92. OS_SONOS = 0xb;
  93. OS_LOGITECH = 0xc;
  94. OS_WP7 = 0xd;
  95. OS_ONKYO = 0xe;
  96. OS_PHILIPS = 0xf;
  97. OS_WD = 0x10;
  98. OS_VOLVO = 0x11;
  99. OS_TIVO = 0x12;
  100. OS_AWOX = 0x13;
  101. OS_MEEGO = 0x14;
  102. OS_QNXNTO = 0x15;
  103. OS_BCO = 0x16;
  104. }
  105. message LibspotifyAppKey {
  106. required uint32 version = 0x1;
  107. required bytes devkey = 0x2;
  108. required bytes signature = 0x3;
  109. required string useragent = 0x4;
  110. required bytes callback_hash = 0x5;
  111. }
  112. message ClientInfo {
  113. optional bool limited = 0x1;
  114. optional ClientInfoFacebook fb = 0x2;
  115. optional string language = 0x3;
  116. }
  117. message ClientInfoFacebook {
  118. optional string machine_id = 0x1;
  119. }
  120. message APWelcome {
  121. required string canonical_username = 0xa;
  122. required AccountType account_type_logged_in = 0x14;
  123. required AccountType credentials_type_logged_in = 0x19;
  124. required AuthenticationType reusable_auth_credentials_type = 0x1e;
  125. required bytes reusable_auth_credentials = 0x28;
  126. optional bytes lfs_secret = 0x32;
  127. optional AccountInfo account_info = 0x3c;
  128. optional AccountInfoFacebook fb = 0x46;
  129. }
  130. enum AccountType {
  131. Spotify = 0x0;
  132. Facebook = 0x1;
  133. }
  134. message AccountInfo {
  135. optional AccountInfoSpotify spotify = 0x1;
  136. optional AccountInfoFacebook facebook = 0x2;
  137. }
  138. message AccountInfoSpotify {
  139. }
  140. message AccountInfoFacebook {
  141. optional string access_token = 0x1;
  142. optional string machine_id = 0x2;
  143. }