|
|
@ -1068,7 +1068,7 @@ namespace MediaBrowser.Server.Implementations.Connect
|
|
|
|
|
|
|
|
|
|
|
|
url += "?serverId=" + ConnectServerId;
|
|
|
|
url += "?serverId=" + ConnectServerId;
|
|
|
|
url += "&supporterKey=" + _securityManager.SupporterKey;
|
|
|
|
url += "&supporterKey=" + _securityManager.SupporterKey;
|
|
|
|
|
|
|
|
|
|
|
|
var options = new HttpRequestOptions
|
|
|
|
var options = new HttpRequestOptions
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Url = url,
|
|
|
|
Url = url,
|
|
|
@ -1085,6 +1085,34 @@ namespace MediaBrowser.Server.Implementations.Connect
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task RemoveConnectSupporter(string id)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!_securityManager.IsMBSupporter)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new InvalidOperationException();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var url = GetConnectUrl("keyAssociation");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
url += "?serverId=" + ConnectServerId;
|
|
|
|
|
|
|
|
url += "&supporterKey=" + _securityManager.SupporterKey;
|
|
|
|
|
|
|
|
url += "&userId=" + id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var options = new HttpRequestOptions
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Url = url,
|
|
|
|
|
|
|
|
CancellationToken = CancellationToken.None
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetServerAccessToken(options);
|
|
|
|
|
|
|
|
SetApplicationHeader(options);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// No need to examine the response
|
|
|
|
|
|
|
|
using (var stream = (await _httpClient.SendAsync(options, "DELETE").ConfigureAwait(false)).Content)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task Authenticate(string username, string passwordMd5)
|
|
|
|
public async Task Authenticate(string username, string passwordMd5)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (string.IsNullOrWhiteSpace(username))
|
|
|
|
if (string.IsNullOrWhiteSpace(username))
|
|
|
|