diff options
| author | Patrick Barron <barronpm@gmail.com> | 2021-06-22 21:09:54 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2021-06-23 20:22:12 -0400 |
| commit | ae878fa051e73dd1df90f1fed3ca5f7ad28b7beb (patch) | |
| tree | 8d590d6ae9aea9a84626fa31695f0ed47969e33d /MediaBrowser.Model/QuickConnect/QuickConnectResult.cs | |
| parent | f96722fa749b94b8affbf75da5d6941cab219a84 (diff) | |
| parent | 94056049131a8573d7a4d0690da04c0e8bc240ad (diff) | |
Merge branch 'master' into authenticationdb-efcore
# Conflicts:
# Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs
# Emby.Server.Implementations/Session/SessionManager.cs
# Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
Diffstat (limited to 'MediaBrowser.Model/QuickConnect/QuickConnectResult.cs')
| -rw-r--r-- | MediaBrowser.Model/QuickConnect/QuickConnectResult.cs | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/MediaBrowser.Model/QuickConnect/QuickConnectResult.cs b/MediaBrowser.Model/QuickConnect/QuickConnectResult.cs index 0fa40b6a7..d180d2986 100644 --- a/MediaBrowser.Model/QuickConnect/QuickConnectResult.cs +++ b/MediaBrowser.Model/QuickConnect/QuickConnectResult.cs @@ -3,38 +3,46 @@ using System; namespace MediaBrowser.Model.QuickConnect { /// <summary> - /// Stores the result of an incoming quick connect request. + /// Stores the state of an quick connect request. /// </summary> public class QuickConnectResult { /// <summary> - /// Gets a value indicating whether this request is authorized. + /// Initializes a new instance of the <see cref="QuickConnectResult"/> class. /// </summary> - public bool Authenticated => !string.IsNullOrEmpty(Authentication); + /// <param name="secret">The secret used to query the request state.</param> + /// <param name="code">The code used to allow the request.</param> + /// <param name="dateAdded">The time when the request was created.</param> + public QuickConnectResult(string secret, string code, DateTime dateAdded) + { + Secret = secret; + Code = code; + DateAdded = dateAdded; + } /// <summary> - /// Gets or sets the secret value used to uniquely identify this request. Can be used to retrieve authentication information. + /// Gets a value indicating whether this request is authorized. /// </summary> - public string? Secret { get; set; } + public bool Authenticated => Authentication != null; /// <summary> - /// Gets or sets the user facing code used so the user can quickly differentiate this request from others. + /// Gets the secret value used to uniquely identify this request. Can be used to retrieve authentication information. /// </summary> - public string? Code { get; set; } + public string Secret { get; } /// <summary> - /// Gets or sets the private access token. + /// Gets the user facing code used so the user can quickly differentiate this request from others. /// </summary> - public string? Authentication { get; set; } + public string Code { get; } /// <summary> - /// Gets or sets an error message. + /// Gets or sets the private access token. /// </summary> - public string? Error { get; set; } + public Guid? Authentication { get; set; } /// <summary> /// Gets or sets the DateTime that this request was created. /// </summary> - public DateTime? DateAdded { get; set; } + public DateTime DateAdded { get; set; } } } |
