authentication.proto 4.0 KB

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