Fix issues with QuickConnect and AuthenticationDb

This commit is contained in:
crobibero
2021-06-23 21:07:08 -06:00
parent ae878fa051
commit 397868be95
8 changed files with 148 additions and 48 deletions

View File

@@ -13,17 +13,32 @@ namespace MediaBrowser.Model.QuickConnect
/// <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)
/// <param name="deviceId">The requesting device id.</param>
/// <param name="deviceName">The requesting device name.</param>
/// <param name="appName">The requesting app name.</param>
/// <param name="appVersion">The requesting app version.</param>
public QuickConnectResult(
string secret,
string code,
DateTime dateAdded,
string deviceId,
string deviceName,
string appName,
string appVersion)
{
Secret = secret;
Code = code;
DateAdded = dateAdded;
DeviceId = deviceId;
DeviceName = deviceName;
AppName = appName;
AppVersion = appVersion;
}
/// <summary>
/// Gets a value indicating whether this request is authorized.
/// Gets or sets a value indicating whether this request is authorized.
/// </summary>
public bool Authenticated => Authentication != null;
public bool Authenticated { get; set; }
/// <summary>
/// Gets the secret value used to uniquely identify this request. Can be used to retrieve authentication information.
@@ -36,9 +51,24 @@ namespace MediaBrowser.Model.QuickConnect
public string Code { get; }
/// <summary>
/// Gets or sets the private access token.
/// Gets the requesting device id.
/// </summary>
public Guid? Authentication { get; set; }
public string DeviceId { get; }
/// <summary>
/// Gets the requesting device name.
/// </summary>
public string DeviceName { get; }
/// <summary>
/// Gets the requesting app name.
/// </summary>
public string AppName { get; }
/// <summary>
/// Gets the requesting app version.
/// </summary>
public string AppVersion { get; }
/// <summary>
/// Gets or sets the DateTime that this request was created.