AuthorizationInfo.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. using Jellyfin.Data.Entities;
  3. namespace MediaBrowser.Controller.Net
  4. {
  5. /// <summary>
  6. /// The request authorization info.
  7. /// </summary>
  8. public class AuthorizationInfo
  9. {
  10. /// <summary>
  11. /// Gets the user identifier.
  12. /// </summary>
  13. /// <value>The user identifier.</value>
  14. public Guid UserId => User?.Id ?? Guid.Empty;
  15. /// <summary>
  16. /// Gets or sets the device identifier.
  17. /// </summary>
  18. /// <value>The device identifier.</value>
  19. public string DeviceId { get; set; }
  20. /// <summary>
  21. /// Gets or sets the device.
  22. /// </summary>
  23. /// <value>The device.</value>
  24. public string Device { get; set; }
  25. /// <summary>
  26. /// Gets or sets the client.
  27. /// </summary>
  28. /// <value>The client.</value>
  29. public string Client { get; set; }
  30. /// <summary>
  31. /// Gets or sets the version.
  32. /// </summary>
  33. /// <value>The version.</value>
  34. public string Version { get; set; }
  35. /// <summary>
  36. /// Gets or sets the token.
  37. /// </summary>
  38. /// <value>The token.</value>
  39. public string Token { get; set; }
  40. /// <summary>
  41. /// Gets or sets a value indicating whether the authorization is from an api key.
  42. /// </summary>
  43. public bool IsApiKey { get; set; }
  44. /// <summary>
  45. /// Gets or sets the user making the request.
  46. /// </summary>
  47. public User User { get; set; }
  48. }
  49. }