mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
Merge pull request #2888 from ConfusedPolarBear/quickconnect
Add quick connect (login without typing password)
This commit is contained in:
@@ -78,6 +78,11 @@ namespace MediaBrowser.Model.Configuration
|
||||
/// <value><c>true</c> if this instance is port authorized; otherwise, <c>false</c>.</value>
|
||||
public bool IsPortAuthorized { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if quick connect is available for use on this server.
|
||||
/// </summary>
|
||||
public bool QuickConnectAvailable { get; set; }
|
||||
|
||||
public bool AutoRunWebApp { get; set; }
|
||||
|
||||
public bool EnableRemoteAccess { get; set; }
|
||||
@@ -299,6 +304,7 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
AutoRunWebApp = true;
|
||||
EnableRemoteAccess = true;
|
||||
QuickConnectAvailable = false;
|
||||
|
||||
EnableUPnP = false;
|
||||
MinResumePct = 5;
|
||||
|
||||
40
MediaBrowser.Model/QuickConnect/QuickConnectResult.cs
Normal file
40
MediaBrowser.Model/QuickConnect/QuickConnectResult.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.QuickConnect
|
||||
{
|
||||
/// <summary>
|
||||
/// Stores the result of an incoming quick connect request.
|
||||
/// </summary>
|
||||
public class QuickConnectResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this request is authorized.
|
||||
/// </summary>
|
||||
public bool Authenticated => !string.IsNullOrEmpty(Authentication);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the secret value used to uniquely identify this request. Can be used to retrieve authentication information.
|
||||
/// </summary>
|
||||
public string? Secret { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user facing code used so the user can quickly differentiate this request from others.
|
||||
/// </summary>
|
||||
public string? Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the private access token.
|
||||
/// </summary>
|
||||
public string? Authentication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an error message.
|
||||
/// </summary>
|
||||
public string? Error { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the DateTime that this request was created.
|
||||
/// </summary>
|
||||
public DateTime? DateAdded { get; set; }
|
||||
}
|
||||
}
|
||||
23
MediaBrowser.Model/QuickConnect/QuickConnectState.cs
Normal file
23
MediaBrowser.Model/QuickConnect/QuickConnectState.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace MediaBrowser.Model.QuickConnect
|
||||
{
|
||||
/// <summary>
|
||||
/// Quick connect state.
|
||||
/// </summary>
|
||||
public enum QuickConnectState
|
||||
{
|
||||
/// <summary>
|
||||
/// This feature has not been opted into and is unavailable until the server administrator chooses to opt-in.
|
||||
/// </summary>
|
||||
Unavailable = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The feature is enabled for use on the server but is not currently accepting connection requests.
|
||||
/// </summary>
|
||||
Available = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The feature is actively accepting connection requests.
|
||||
/// </summary>
|
||||
Active = 2
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user