From a86b71899ec52c44ddc6c3018e8cc5e9d7ff4d62 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Thu, 27 Dec 2018 18:27:57 -0500 Subject: Add GPL modules --- MediaBrowser.Controller/Connect/IConnectManager.cs | 45 ++++++++++++++++++++++ MediaBrowser.Controller/Connect/UserLinkResult.cs | 10 +++++ 2 files changed, 55 insertions(+) create mode 100644 MediaBrowser.Controller/Connect/IConnectManager.cs create mode 100644 MediaBrowser.Controller/Connect/UserLinkResult.cs (limited to 'MediaBrowser.Controller/Connect') diff --git a/MediaBrowser.Controller/Connect/IConnectManager.cs b/MediaBrowser.Controller/Connect/IConnectManager.cs new file mode 100644 index 0000000000..8ac61bf2b1 --- /dev/null +++ b/MediaBrowser.Controller/Connect/IConnectManager.cs @@ -0,0 +1,45 @@ +using MediaBrowser.Controller.Entities; +using MediaBrowser.Model.Connect; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Connect +{ + public interface IConnectManager + { + /// + /// Gets the wan API address. + /// + /// The wan API address. + string WanApiAddress { get; } + + /// + /// Links the user. + /// + /// The user identifier. + /// The connect username. + /// Task. + Task LinkUser(string userId, string connectUsername); + + /// + /// Removes the link. + /// + /// The user identifier. + /// Task. + Task RemoveConnect(string userId); + + User GetUserFromExchangeToken(string token); + + /// + /// Authenticates the specified username. + /// + Task Authenticate(string username, string password, string passwordMd5); + + /// + /// Determines whether [is authorization token valid] [the specified token]. + /// + /// The token. + /// true if [is authorization token valid] [the specified token]; otherwise, false. + bool IsAuthorizationTokenValid(string token); + } +} diff --git a/MediaBrowser.Controller/Connect/UserLinkResult.cs b/MediaBrowser.Controller/Connect/UserLinkResult.cs new file mode 100644 index 0000000000..16ebfc70a3 --- /dev/null +++ b/MediaBrowser.Controller/Connect/UserLinkResult.cs @@ -0,0 +1,10 @@ + +namespace MediaBrowser.Controller.Connect +{ + public class UserLinkResult + { + public bool IsPending { get; set; } + public bool IsNewUserInvitation { get; set; } + public string GuestDisplayName { get; set; } + } +} -- cgit v1.2.3