diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-08-31 23:01:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-31 23:01:27 +0200 |
| commit | 8ee042483a2b6cc5f25f1eef05650a8ff4296923 (patch) | |
| tree | e1588518cf37d1720724c47a55fd1bb84de3c8d3 /MediaBrowser.Model/QuickConnect | |
| parent | 43a81366a623b54668ceda13d5d47740e39c9855 (diff) | |
| parent | df0d197dc8509b38c6b4e5bd9ec442810bc0c647 (diff) | |
Merge pull request #2888 from ConfusedPolarBear/quickconnect
Add quick connect (login without typing password)
Diffstat (limited to 'MediaBrowser.Model/QuickConnect')
| -rw-r--r-- | MediaBrowser.Model/QuickConnect/QuickConnectResult.cs | 40 | ||||
| -rw-r--r-- | MediaBrowser.Model/QuickConnect/QuickConnectState.cs | 23 |
2 files changed, 63 insertions, 0 deletions
diff --git a/MediaBrowser.Model/QuickConnect/QuickConnectResult.cs b/MediaBrowser.Model/QuickConnect/QuickConnectResult.cs new file mode 100644 index 000000000..0fa40b6a7 --- /dev/null +++ b/MediaBrowser.Model/QuickConnect/QuickConnectResult.cs @@ -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; } + } +} diff --git a/MediaBrowser.Model/QuickConnect/QuickConnectState.cs b/MediaBrowser.Model/QuickConnect/QuickConnectState.cs new file mode 100644 index 000000000..f1074f25f --- /dev/null +++ b/MediaBrowser.Model/QuickConnect/QuickConnectState.cs @@ -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 + } +} |
