blob: 70bdc52e634e5a3cdded4bf6670de8458b4e5248 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Connect;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Connect
{
public interface IConnectManager
{
/// <summary>
/// Gets the wan API address.
/// </summary>
/// <value>The wan API address.</value>
string WanApiAddress { get; }
/// <summary>
/// Links the user.
/// </summary>
/// <param name="userId">The user identifier.</param>
/// <param name="connectUsername">The connect username.</param>
/// <returns>Task.</returns>
Task<UserLinkResult> LinkUser(string userId, string connectUsername);
/// <summary>
/// Removes the link.
/// </summary>
/// <param name="userId">The user identifier.</param>
/// <returns>Task.</returns>
Task RemoveConnect(string userId);
/// <summary>
/// Invites the user.
/// </summary>
/// <param name="request">The request.</param>
/// <returns>Task<UserLinkResult>.</returns>
Task<UserLinkResult> InviteUser(ConnectAuthorizationRequest request);
/// <summary>
/// Gets the pending guests.
/// </summary>
/// <returns>Task<List<ConnectAuthorization>>.</returns>
Task<List<ConnectAuthorization>> GetPendingGuests();
/// <summary>
/// Gets the user from exchange token.
/// </summary>
/// <param name="token">The token.</param>
/// <returns>User.</returns>
User GetUserFromExchangeToken(string token);
/// <summary>
/// Cancels the authorization.
/// </summary>
/// <param name="id">The identifier.</param>
/// <returns>Task.</returns>
Task CancelAuthorization(string id);
/// <summary>
/// Authenticates the specified username.
/// </summary>
Task<ConnectAuthenticationResult> Authenticate(string username, string password, string passwordMd5);
/// <summary>
/// Gets the local user.
/// </summary>
/// <param name="connectUserId">The connect user identifier.</param>
/// <returns>Task<User>.</returns>
Task<User> GetLocalUser(string connectUserId);
/// <summary>
/// Determines whether [is authorization token valid] [the specified token].
/// </summary>
/// <param name="token">The token.</param>
/// <returns><c>true</c> if [is authorization token valid] [the specified token]; otherwise, <c>false</c>.</returns>
bool IsAuthorizationTokenValid(string token);
}
}
|