authentication.proto 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. enum CpuFamily {
  2. CPU_UNKNOWN = 0x0;
  3. CPU_X86 = 0x1;
  4. CPU_X86_64 = 0x2;
  5. CPU_PPC = 0x3;
  6. CPU_PPC_64 = 0x4;
  7. CPU_ARM = 0x5;
  8. CPU_IA64 = 0x6;
  9. CPU_SH = 0x7;
  10. CPU_MIPS = 0x8;
  11. CPU_BLACKFIN = 0x9;
  12. }
  13. enum Os {
  14. OS_UNKNOWN = 0x0;
  15. OS_WINDOWS = 0x1;
  16. OS_OSX = 0x2;
  17. OS_IPHONE = 0x3;
  18. OS_S60 = 0x4;
  19. OS_LINUX = 0x5;
  20. OS_WINDOWS_CE = 0x6;
  21. OS_ANDROID = 0x7;
  22. OS_PALM = 0x8;
  23. OS_FREEBSD = 0x9;
  24. OS_BLACKBERRY = 0xa;
  25. OS_SONOS = 0xb;
  26. OS_LOGITECH = 0xc;
  27. OS_WP7 = 0xd;
  28. OS_ONKYO = 0xe;
  29. OS_PHILIPS = 0xf;
  30. OS_WD = 0x10;
  31. OS_VOLVO = 0x11;
  32. OS_TIVO = 0x12;
  33. OS_AWOX = 0x13;
  34. OS_MEEGO = 0x14;
  35. OS_QNXNTO = 0x15;
  36. OS_BCO = 0x16;
  37. }
  38. enum AccountType {
  39. Spotify = 0x0;
  40. Facebook = 0x1;
  41. }
  42. enum AuthenticationType {
  43. AUTHENTICATION_USER_PASS = 0x0;
  44. AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS = 0x1;
  45. AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS = 0x2;
  46. AUTHENTICATION_SPOTIFY_TOKEN = 0x3;
  47. AUTHENTICATION_FACEBOOK_TOKEN = 0x4;
  48. }
  49. message SystemInfo {
  50. required CpuFamily cpu_family = 0xa;
  51. required Os os = 0x3c;
  52. required string system_information_string = 0x5a;
  53. required string device_id = 0x64;
  54. }
  55. message LoginCredentials {
  56. required string username = 0xa;
  57. required AuthenticationType typ = 0x14;
  58. required bytes auth_data = 0x1e;
  59. }
  60. message ClientResponseEncrypted {
  61. required LoginCredentials login_credentials = 0xa;
  62. required SystemInfo system_info = 0x32;
  63. optional string version_string = 0x46;
  64. }
  65. message APWelcome {
  66. required string canonical_username = 0xa;
  67. required AccountType account_type_logged_in = 0x14;
  68. required AccountType credentials_type_logged_in = 0x19;
  69. required AuthenticationType reusable_auth_credentials_type = 0x1e;
  70. required bytes reusable_auth_credentials = 0x28;
  71. optional bytes lfs_secret = 0x32;
  72. optional AccountInfo account_info = 0x3c;
  73. optional AccountInfoFacebook fb = 0x46;
  74. }
  75. message AccountInfo {
  76. optional AccountInfoSpotify spotify = 0x1;
  77. optional AccountInfoFacebook facebook = 0x2;
  78. }
  79. message AccountInfoSpotify {
  80. }
  81. message AccountInfoFacebook {
  82. optional string access_token = 0x1;
  83. optional string machine_id = 0x2;
  84. }