| | 1 | | #nullable disable |
| | 2 | |
|
| | 3 | | using System; |
| | 4 | | using Jellyfin.Data.Entities; |
| | 5 | |
|
| | 6 | | namespace MediaBrowser.Controller.Net |
| | 7 | | { |
| | 8 | | /// <summary> |
| | 9 | | /// The request authorization info. |
| | 10 | | /// </summary> |
| | 11 | | public class AuthorizationInfo |
| | 12 | | { |
| | 13 | | /// <summary> |
| | 14 | | /// Gets the user identifier. |
| | 15 | | /// </summary> |
| | 16 | | /// <value>The user identifier.</value> |
| 115 | 17 | | public Guid UserId => User?.Id ?? Guid.Empty; |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// Gets or sets the device identifier. |
| | 21 | | /// </summary> |
| | 22 | | /// <value>The device identifier.</value> |
| | 23 | | public string DeviceId { get; set; } |
| | 24 | |
|
| | 25 | | /// <summary> |
| | 26 | | /// Gets or sets the device. |
| | 27 | | /// </summary> |
| | 28 | | /// <value>The device.</value> |
| | 29 | | public string Device { get; set; } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Gets or sets the client. |
| | 33 | | /// </summary> |
| | 34 | | /// <value>The client.</value> |
| | 35 | | public string Client { get; set; } |
| | 36 | |
|
| | 37 | | /// <summary> |
| | 38 | | /// Gets or sets the version. |
| | 39 | | /// </summary> |
| | 40 | | /// <value>The version.</value> |
| | 41 | | public string Version { get; set; } |
| | 42 | |
|
| | 43 | | /// <summary> |
| | 44 | | /// Gets or sets the token. |
| | 45 | | /// </summary> |
| | 46 | | /// <value>The token.</value> |
| | 47 | | public string Token { get; set; } |
| | 48 | |
|
| | 49 | | /// <summary> |
| | 50 | | /// Gets or sets a value indicating whether the authorization is from an api key. |
| | 51 | | /// </summary> |
| | 52 | | public bool IsApiKey { get; set; } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// Gets or sets the user making the request. |
| | 56 | | /// </summary> |
| | 57 | | public User User { get; set; } |
| | 58 | |
|
| | 59 | | /// <summary> |
| | 60 | | /// Gets or sets a value indicating whether the token is authenticated. |
| | 61 | | /// </summary> |
| | 62 | | public bool IsAuthenticated { get; set; } |
| | 63 | |
|
| | 64 | | /// <summary> |
| | 65 | | /// Gets or sets a value indicating whether the request has a token. |
| | 66 | | /// </summary> |
| | 67 | | public bool HasToken { get; set; } |
| | 68 | | } |
| | 69 | | } |