aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Common.Implementations')
-rw-r--r--MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj1
-rw-r--r--MediaBrowser.Common.Implementations/Security/MbAdmin.cs13
-rw-r--r--MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs6
-rw-r--r--MediaBrowser.Common.Implementations/Updates/InstallationManager.cs7
4 files changed, 19 insertions, 8 deletions
diff --git a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj
index 58ffb93bc..42a402940 100644
--- a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj
+++ b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj
@@ -95,6 +95,7 @@
<Compile Include="ScheduledTasks\Tasks\DeleteCacheFileTask.cs" />
<Compile Include="ScheduledTasks\Tasks\DeleteLogFileTask.cs" />
<Compile Include="ScheduledTasks\Tasks\ReloadLoggerFileTask.cs" />
+ <Compile Include="Security\MbAdmin.cs" />
<Compile Include="Security\MBLicenseFile.cs" />
<Compile Include="Security\PluginSecurityManager.cs" />
<Compile Include="Security\RegRecord.cs" />
diff --git a/MediaBrowser.Common.Implementations/Security/MbAdmin.cs b/MediaBrowser.Common.Implementations/Security/MbAdmin.cs
new file mode 100644
index 000000000..9171e9e13
--- /dev/null
+++ b/MediaBrowser.Common.Implementations/Security/MbAdmin.cs
@@ -0,0 +1,13 @@
+
+namespace MediaBrowser.Common.Implementations.Security
+{
+ public class MbAdmin
+ {
+ public const string HttpUrl = "https://www.mb3admin.com/admin/";
+
+ /// <summary>
+ /// Leaving as http for now until we get it squared away
+ /// </summary>
+ public const string HttpsUrl = "http://www.mb3admin.com/admin/";
+ }
+}
diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
index dfdf61016..3e81e839f 100644
--- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
+++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
@@ -17,9 +17,7 @@ namespace MediaBrowser.Common.Implementations.Security
/// </summary>
public class PluginSecurityManager : ISecurityManager
{
- private const string MbAdminUrl = "https://www.mb3admin.com/admin/";
-
- private const string MBValidateUrl = MbAdminUrl + "service/registration/validate";
+ private const string MBValidateUrl = MbAdmin.HttpsUrl + "service/registration/validate";
/// <summary>
/// The _is MB supporter
@@ -162,7 +160,7 @@ namespace MediaBrowser.Common.Implementations.Security
return new SupporterInfo();
}
- var url = MbAdminUrl + "/service/supporter/retrieve?key=" + key;
+ var url = MbAdmin.HttpsUrl + "/service/supporter/retrieve?key=" + key;
using (var stream = await _httpClient.Get(url, CancellationToken.None).ConfigureAwait(false))
{
diff --git a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs
index e707129c1..f3a985968 100644
--- a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs
+++ b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs
@@ -1,5 +1,6 @@
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Events;
+using MediaBrowser.Common.Implementations.Security;
using MediaBrowser.Common.Net;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.Progress;
@@ -161,7 +162,7 @@ namespace MediaBrowser.Common.Implementations.Updates
{ "systemid", _applicationHost.SystemId }
};
- using (var json = await _httpClient.Post(MbAdminUrlHttps + "service/package/retrieveall", data, cancellationToken).ConfigureAwait(false))
+ using (var json = await _httpClient.Post(MbAdmin.HttpsUrl + "service/package/retrieveall", data, cancellationToken).ConfigureAwait(false))
{
cancellationToken.ThrowIfCancellationRequested();
@@ -172,8 +173,6 @@ namespace MediaBrowser.Common.Implementations.Updates
}
private Tuple<List<PackageInfo>, DateTime> _lastPackageListResult;
- private const string MbAdminUrlHttp = "http://www.mb3admin.com/admin/";
- private const string MbAdminUrlHttps = "https://www.mb3admin.com/admin/";
/// <summary>
/// Gets all available packages.
@@ -205,7 +204,7 @@ namespace MediaBrowser.Common.Implementations.Updates
}
}
- using (var json = await _httpClient.Get(MbAdminUrlHttp + "service/MB3Packages.json", cancellationToken).ConfigureAwait(false))
+ using (var json = await _httpClient.Get(MbAdmin.HttpUrl + "service/MB3Packages.json", cancellationToken).ConfigureAwait(false))
{
cancellationToken.ThrowIfCancellationRequested();