aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-02 16:54:37 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-02 18:09:53 -0500
commit687f17f09a53515a93f3611638675f6b743ee620 (patch)
tree83673c77d773b90e57362d26c161e6cd03edf724 /MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
parent0c42154c124201129107e9491ea106e9135bc0f0 (diff)
better caching of remote data
Conflicts: MediaBrowser.Api/System/SystemService.cs
Diffstat (limited to 'MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs')
-rw-r--r--MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs60
1 files changed, 0 insertions, 60 deletions
diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
index e796dba76..d8f350207 100644
--- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
+++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
@@ -153,66 +153,6 @@ namespace MediaBrowser.Common.Implementations.Security
}
}
- public async Task<SupporterInfo> GetSupporterInfo()
- {
- var key = SupporterKey;
-
- if (string.IsNullOrWhiteSpace(key))
- {
- return new SupporterInfo();
- }
-
- var data = new Dictionary<string, string>
- {
- { "key", key },
- };
-
- 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 info = new SupporterInfo
- {
- Email = response.email,
- PlanType = response.planType,
- SupporterKey = response.supporterKey,
- IsActiveSupporter = IsMBSupporter
- };
-
- if (!string.IsNullOrWhiteSpace(response.expDate))
- {
- DateTime parsedDate;
- if (DateTime.TryParse(response.expDate, out parsedDate))
- {
- info.ExpirationDate = parsedDate;
- }
- else
- {
- _logger.Error("Failed to parse expDate: {0}", response.expDate);
- }
- }
-
- if (!string.IsNullOrWhiteSpace(response.regDate))
- {
- DateTime parsedDate;
- if (DateTime.TryParse(response.regDate, out parsedDate))
- {
- info.RegistrationDate = parsedDate;
- }
- else
- {
- _logger.Error("Failed to parse regDate: {0}", response.regDate);
- }
- }
-
- info.IsExpiredSupporter = info.ExpirationDate.HasValue && info.ExpirationDate < DateTime.UtcNow && !string.IsNullOrWhiteSpace(info.SupporterKey);
-
- return info;
- }
- }
-
/// <summary>
/// Register an app store sale with our back-end. It will validate the transaction with the store
/// and then register the proper feature and then fill in the supporter key on success.