mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
Merge branch 'dev' of https://github.com/MediaBrowser/Emby into dev
This commit is contained in:
commit
d469e3623e
@ -158,9 +158,14 @@ namespace MediaBrowser.Common.Implementations.Security
|
|||||||
return new SupporterInfo();
|
return new SupporterInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
var url = MbAdmin.HttpsUrl + "/service/supporter/retrieve?key=" + key;
|
var data = new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{ "key", key },
|
||||||
|
};
|
||||||
|
|
||||||
using (var stream = await _httpClient.Get(url, CancellationToken.None).ConfigureAwait(false))
|
var url = MbAdmin.HttpsUrl + "/service/supporter/retrieve";
|
||||||
|
|
||||||
|
using (var stream = await _httpClient.Post(url, data, CancellationToken.None).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
var response = _jsonSerializer.DeserializeFromStream<SuppporterInfoResponse>(stream);
|
var response = _jsonSerializer.DeserializeFromStream<SuppporterInfoResponse>(stream);
|
||||||
|
|
||||||
|
@ -1079,20 +1079,25 @@ namespace MediaBrowser.Server.Implementations.Connect
|
|||||||
|
|
||||||
var url = GetConnectUrl("keyAssociation");
|
var url = GetConnectUrl("keyAssociation");
|
||||||
|
|
||||||
url += "?serverId=" + ConnectServerId;
|
|
||||||
url += "&supporterKey=" + _securityManager.SupporterKey;
|
|
||||||
|
|
||||||
var options = new HttpRequestOptions
|
var options = new HttpRequestOptions
|
||||||
{
|
{
|
||||||
Url = url,
|
Url = url,
|
||||||
CancellationToken = CancellationToken.None
|
CancellationToken = CancellationToken.None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var postData = new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{"serverId", ConnectServerId},
|
||||||
|
{"supporterKey", _securityManager.SupporterKey}
|
||||||
|
};
|
||||||
|
|
||||||
|
options.SetPostData(postData);
|
||||||
|
|
||||||
SetServerAccessToken(options);
|
SetServerAccessToken(options);
|
||||||
SetApplicationHeader(options);
|
SetApplicationHeader(options);
|
||||||
|
|
||||||
// No need to examine the response
|
// No need to examine the response
|
||||||
using (var stream = (await _httpClient.SendAsync(options, "GET").ConfigureAwait(false)).Content)
|
using (var stream = (await _httpClient.SendAsync(options, "POST").ConfigureAwait(false)).Content)
|
||||||
{
|
{
|
||||||
return _json.DeserializeFromStream<ConnectSupporterSummary>(stream);
|
return _json.DeserializeFromStream<ConnectSupporterSummary>(stream);
|
||||||
}
|
}
|
||||||
@ -1107,16 +1112,21 @@ namespace MediaBrowser.Server.Implementations.Connect
|
|||||||
|
|
||||||
var url = GetConnectUrl("keyAssociation");
|
var url = GetConnectUrl("keyAssociation");
|
||||||
|
|
||||||
url += "?serverId=" + ConnectServerId;
|
|
||||||
url += "&supporterKey=" + _securityManager.SupporterKey;
|
|
||||||
url += "&userId=" + id;
|
|
||||||
|
|
||||||
var options = new HttpRequestOptions
|
var options = new HttpRequestOptions
|
||||||
{
|
{
|
||||||
Url = url,
|
Url = url,
|
||||||
CancellationToken = CancellationToken.None
|
CancellationToken = CancellationToken.None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var postData = new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{"serverId", ConnectServerId},
|
||||||
|
{"supporterKey", _securityManager.SupporterKey},
|
||||||
|
{"userId", id}
|
||||||
|
};
|
||||||
|
|
||||||
|
options.SetPostData(postData);
|
||||||
|
|
||||||
SetServerAccessToken(options);
|
SetServerAccessToken(options);
|
||||||
SetApplicationHeader(options);
|
SetApplicationHeader(options);
|
||||||
|
|
||||||
@ -1135,16 +1145,21 @@ namespace MediaBrowser.Server.Implementations.Connect
|
|||||||
|
|
||||||
var url = GetConnectUrl("keyAssociation");
|
var url = GetConnectUrl("keyAssociation");
|
||||||
|
|
||||||
url += "?serverId=" + ConnectServerId;
|
|
||||||
url += "&supporterKey=" + _securityManager.SupporterKey;
|
|
||||||
url += "&userId=" + id;
|
|
||||||
|
|
||||||
var options = new HttpRequestOptions
|
var options = new HttpRequestOptions
|
||||||
{
|
{
|
||||||
Url = url,
|
Url = url,
|
||||||
CancellationToken = CancellationToken.None
|
CancellationToken = CancellationToken.None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var postData = new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{"serverId", ConnectServerId},
|
||||||
|
{"supporterKey", _securityManager.SupporterKey},
|
||||||
|
{"userId", id}
|
||||||
|
};
|
||||||
|
|
||||||
|
options.SetPostData(postData);
|
||||||
|
|
||||||
SetServerAccessToken(options);
|
SetServerAccessToken(options);
|
||||||
SetApplicationHeader(options);
|
SetApplicationHeader(options);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user