AuthorizationInfo.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using MediaBrowser.Controller.Entities;
  2. using System;
  3. namespace MediaBrowser.Controller.Net
  4. {
  5. public class AuthorizationInfo
  6. {
  7. /// <summary>
  8. /// Gets or sets the user identifier.
  9. /// </summary>
  10. /// <value>The user identifier.</value>
  11. public Guid UserId {
  12. get {
  13. if (User == null) {
  14. return Guid.Empty;
  15. }
  16. else {
  17. return User.Id;
  18. }
  19. }
  20. }
  21. /// <summary>
  22. /// Gets or sets the device identifier.
  23. /// </summary>
  24. /// <value>The device identifier.</value>
  25. public string DeviceId { get; set; }
  26. /// <summary>
  27. /// Gets or sets the device.
  28. /// </summary>
  29. /// <value>The device.</value>
  30. public string Device { get; set; }
  31. /// <summary>
  32. /// Gets or sets the client.
  33. /// </summary>
  34. /// <value>The client.</value>
  35. public string Client { get; set; }
  36. /// <summary>
  37. /// Gets or sets the version.
  38. /// </summary>
  39. /// <value>The version.</value>
  40. public string Version { get; set; }
  41. /// <summary>
  42. /// Gets or sets the token.
  43. /// </summary>
  44. /// <value>The token.</value>
  45. public string Token { get; set; }
  46. public User User { get; set; }
  47. }
  48. }