mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 09:44:47 +03:00
update connect methods
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using System.Security.Cryptography;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
@@ -825,5 +827,24 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
_logger.Debug("Connect returned a 404 when removing a user auth link. Handling it.");
|
||||
}
|
||||
}
|
||||
|
||||
public async Task Authenticate(string username, string passwordMd5)
|
||||
{
|
||||
var request = new HttpRequestOptions
|
||||
{
|
||||
Url = GetConnectUrl("user/authenticate")
|
||||
};
|
||||
|
||||
request.SetPostData(new Dictionary<string, string>
|
||||
{
|
||||
{"userName",username},
|
||||
{"password",passwordMd5}
|
||||
});
|
||||
|
||||
// No need to examine the response
|
||||
using (var stream = (await _httpClient.SendAsync(request, "POST").ConfigureAwait(false)).Content)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user