aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md20
-rw-r--r--Dockerfile.arm8
-rw-r--r--Dockerfile.arm649
-rw-r--r--Emby.Server.Implementations/Localization/Core/bn.json96
-rw-r--r--Emby.Server.Implementations/Localization/Core/es_DO.json1
-rw-r--r--Emby.Server.Implementations/Localization/Core/fi.json4
-rw-r--r--Emby.Server.Implementations/Localization/Core/hu.json8
-rw-r--r--Emby.Server.Implementations/Localization/Core/id.json7
-rw-r--r--MediaBrowser.Api/Sessions/ApiKeyService.cs85
-rw-r--r--MediaBrowser.Api/Sessions/SessionInfoWebSocketListener.cs (renamed from MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs)2
-rw-r--r--MediaBrowser.Api/Sessions/SessionService.cs (renamed from MediaBrowser.Api/Session/SessionsService.cs)74
11 files changed, 229 insertions, 85 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index bd13d4b00..d67e1c98b 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -10,6 +10,19 @@ assignees: ''
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
+**System (please complete the following information):**
+ - OS: [e.g. Debian, Windows]
+ - Virtualization: [e.g. Docker, KVM, LXC]
+ - Clients: [Browser, Android, Fire Stick, etc.]
+ - Browser: [e.g. Firefox 72, Chrome 80, Safari 13]
+ - Jellyfin Version: [e.g. 10.4.3, nightly 20191231]
+ - Playback: [Direct Play, Remux, Direct Stream, Transcode]
+ - Installed Plugins: [e.g. none, Fanart, Anime, etc.]
+ - Reverse Proxy: [e.g. none, nginx, apache, etc.]
+ - Base URL: [e.g. none, yes: /example]
+ - Networking: [e.g. Host, Bridge/NAT]
+ - Storage: [e.g. local, NFS, cloud]
+
**To Reproduce**
<!-- Steps to reproduce the behavior: -->
1. Go to '...'
@@ -26,12 +39,5 @@ assignees: ''
**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->
-**System (please complete the following information):**
- - OS: [e.g. Docker, Debian, Windows]
- - Browser: [e.g. Firefox, Chrome, Safari]
- - Jellyfin Version: [e.g. 10.0.1]
- - Installed Plugins: [e.g. none, Fanart, Anime, etc.]
- - Reverse proxy: [e.g. no, nginx, apache, etc.]
-
**Additional context**
<!-- Add any other context about the problem here. -->
diff --git a/Dockerfile.arm b/Dockerfile.arm
index 5151d4cb6..5847de918 100644
--- a/Dockerfile.arm
+++ b/Dockerfile.arm
@@ -1,3 +1,7 @@
+# DESIGNED FOR BUILDING ON AMD64 ONLY
+#####################################
+# Requires binfm_misc registration
+# https://github.com/multiarch/qemu-user-static#binfmt_misc-register
ARG DOTNET_VERSION=3.1
@@ -21,7 +25,9 @@ RUN find . -type d -name obj | xargs -r rm -r
RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-arm "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
-FROM debian:buster-slim
+FROM multiarch/qemu-user-static:x86_64-arm as qemu
+FROM arm32v7/debian:buster-slim
+COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
libssl-dev ca-certificates \
diff --git a/Dockerfile.arm64 b/Dockerfile.arm64
index bf9604bbf..a9f6c50d9 100644
--- a/Dockerfile.arm64
+++ b/Dockerfile.arm64
@@ -1,3 +1,7 @@
+# DESIGNED FOR BUILDING ON AMD64 ONLY
+#####################################
+# Requires binfm_misc registration
+# https://github.com/multiarch/qemu-user-static#binfmt_misc-register
ARG DOTNET_VERSION=3.1
@@ -20,8 +24,9 @@ RUN find . -type d -name obj | xargs -r rm -r
# Build
RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-arm64 "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
-
-FROM debian:buster-slim
+FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
+FROM arm64v8/debian:buster-slim
+COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
libssl-dev ca-certificates \
diff --git a/Emby.Server.Implementations/Localization/Core/bn.json b/Emby.Server.Implementations/Localization/Core/bn.json
new file mode 100644
index 000000000..a7219a725
--- /dev/null
+++ b/Emby.Server.Implementations/Localization/Core/bn.json
@@ -0,0 +1,96 @@
+{
+ "DeviceOnlineWithName": "{0}-এর সাথে সংযুক্ত হয়েছে",
+ "DeviceOfflineWithName": "{0}-এর সাথে সংযোগ বিচ্ছিন্ন হয়েছে",
+ "Collections": "সংকলন",
+ "ChapterNameValue": "অধ্যায় {0}",
+ "Channels": "চ্যানেল",
+ "CameraImageUploadedFrom": "একটি নতুন ক্যামেরার চিত্র আপলোড করা হয়েছে {0} থেকে",
+ "Books": "বই",
+ "AuthenticationSucceededWithUserName": "{0} যাচাই সফল",
+ "Artists": "শিল্পী",
+ "Application": "অ্যাপ্লিকেশন",
+ "Albums": "অ্যালবামগুলো",
+ "HeaderFavoriteEpisodes": "প্রিব পর্বগুলো",
+ "HeaderFavoriteArtists": "প্রিয় শিল্পীরা",
+ "HeaderFavoriteAlbums": "প্রিয় এলবামগুলো",
+ "HeaderContinueWatching": "দেখতে থাকুন",
+ "HeaderCameraUploads": "ক্যামেরার আপলোডগুলো",
+ "HeaderAlbumArtists": "এলবামের শিল্পী",
+ "Genres": "ঘরানা",
+ "Folders": "ফোল্ডারগুলো",
+ "Favorites": "ফেভারিটগুলো",
+ "FailedLoginAttemptWithUserName": "{0} থেকে লগিন করতে ব্যর্থ",
+ "AppDeviceValues": "এপ: {0}, ডিভাইস: {0}",
+ "VersionNumber": "সংস্করণ {0}",
+ "ValueSpecialEpisodeName": "বিশেষ - {0}",
+ "ValueHasBeenAddedToLibrary": "আপনার লাইব্রেরিতে {0} যোগ করা হয়েছে",
+ "UserStoppedPlayingItemWithValues": "{2}তে {1} বাজানো শেষ করেছেন {0}",
+ "UserStartedPlayingItemWithValues": "{2}তে {1} বাজাচ্ছেন {0}",
+ "UserPolicyUpdatedWithName": "{0} এর জন্য ব্যবহার নীতি আপডেট করা হয়েছে",
+ "UserPasswordChangedWithName": "ব্যবহারকারী {0} এর পাসওয়ার্ড পরিবর্তিত হয়েছে",
+ "UserOnlineFromDevice": "{0}, {1} থেকে অনলাইন",
+ "UserOfflineFromDevice": "{0} {1} থেকে বিযুক্ত হয়ে গেছে",
+ "UserLockedOutWithName": "ব্যবহারকারী {0} ঢুকতে পারছে না",
+ "UserDownloadingItemWithValues": "{0}, {1} ডাউনলোড করছে",
+ "UserDeletedWithName": "ব্যবহারকারী {0}কে বাদ দেয়া হয়েছে",
+ "UserCreatedWithName": "ব্যবহারকারী {0} সৃষ্টি করা হয়েছে",
+ "User": "ব্যবহারকারী",
+ "TvShows": "টিভি শোগুলো",
+ "System": "সিস্টেম",
+ "Sync": "সিংক",
+ "SubtitlesDownloadedForItem": "{0} এর জন্য সাবটাইটেল ডাউনলোড করা হয়েছে",
+ "SubtitleDownloadFailureFromForItem": "{2} থেকে {1} এর জন্য সাবটাইটেল ডাউনলোড ব্যর্থ",
+ "StartupEmbyServerIsLoading": "জেলিফিন সার্ভার লোড হচ্ছে। দয়া করে একটু পরে আবার চেষ্টা করুন।",
+ "Songs": "গানগুলো",
+ "Shows": "টিভি পর্ব",
+ "ServerNameNeedsToBeRestarted": "{0} রিস্টার্ট করা প্রয়োজন",
+ "ScheduledTaskStartedWithName": "{0} শুরু হয়েছে",
+ "ScheduledTaskFailedWithName": "{0} ব্যর্থ",
+ "ProviderValue": "প্রদানকারী: {0}",
+ "PluginUpdatedWithName": "{0} আপডেট করা হয়েছে",
+ "PluginUninstalledWithName": "{0} বাদ দেয়া হয়েছে",
+ "PluginInstalledWithName": "{0} ইন্সটল করা হয়েছে",
+ "Plugin": "প্লাগিন",
+ "Playlists": "প্লেলিস্ট",
+ "Photos": "ছবিগুলো",
+ "NotificationOptionVideoPlaybackStopped": "ভিডিও চলা বন্ধ",
+ "NotificationOptionVideoPlayback": "ভিডিও চলা শুরু হয়েছে",
+ "NotificationOptionUserLockedOut": "ব্যবহারকারী ঢুকতে পারছে না",
+ "NotificationOptionTaskFailed": "পরিকল্পিত কাজটি ব্যর্থ",
+ "NotificationOptionServerRestartRequired": "সার্ভার রিস্টার্ট বাধ্যতামূলক",
+ "NotificationOptionPluginUpdateInstalled": "প্লাগিন আপডেট ইন্সটল করা হয়েছে",
+ "NotificationOptionPluginUninstalled": "প্লাগিন বাদ দেয়া হয়েছে",
+ "NotificationOptionPluginInstalled": "প্লাগিন ইন্সটল করা হয়েছে",
+ "NotificationOptionPluginError": "প্লাগিন ব্যর্থ",
+ "NotificationOptionNewLibraryContent": "নতুন কন্টেন্ট যোগ করা হয়েছে",
+ "NotificationOptionInstallationFailed": "ইন্সটল ব্যর্থ",
+ "NotificationOptionCameraImageUploaded": "ক্যামেরার ছবি আপলোড হয়েছে",
+ "NotificationOptionAudioPlaybackStopped": "গান বাজা বন্ধ হয়েছে",
+ "NotificationOptionAudioPlayback": "গান বাজা শুরু হয়েছে",
+ "NotificationOptionApplicationUpdateInstalled": "এপ্লিকেশনের আপডেট ইনস্টল করা হয়েছে",
+ "NotificationOptionApplicationUpdateAvailable": "এপ্লিকেশনের আপডেট রয়েছে",
+ "NewVersionIsAvailable": "জেলিফিন সার্ভারের একটি নতুন ভার্শন ডাউনলোডের জন্য তৈরী",
+ "NameSeasonUnknown": "সিজন অজানা",
+ "NameSeasonNumber": "সিজন {0}",
+ "NameInstallFailed": "{0} ইন্সটল ব্যর্থ",
+ "MusicVideos": "গানের ভিডিও",
+ "Music": "গান",
+ "Movies": "সিনেমা",
+ "MixedContent": "মিশ্র কন্টেন্ট",
+ "MessageServerConfigurationUpdated": "সার্ভারের কনফিগারেশন হালনাগাদ করা হয়েছে",
+ "HeaderRecordingGroups": "রেকর্ডিং গ্রুপ",
+ "MessageNamedServerConfigurationUpdatedWithValue": "সার্ভারের {0} কনফিগারেসন অংশ আপডেট করা হয়েছে",
+ "MessageApplicationUpdatedTo": "জেলিফিন সার্ভার {0} তে হালনাগাদ করা হয়েছে",
+ "MessageApplicationUpdated": "জেলিফিন সার্ভার হালনাগাদ করা হয়েছে",
+ "Latest": "একদম নতুন",
+ "LabelRunningTimeValue": "চলার সময়: {0}",
+ "LabelIpAddressValue": "আইপি ঠিকানা: {0}",
+ "ItemRemovedWithName": "{0} লাইব্রেরি থেকে বাদ দেয়া হয়েছে",
+ "ItemAddedWithName": "{0} লাইব্রেরিতে যোগ করা হয়েছে",
+ "Inherit": "থেকে পাওয়া",
+ "HomeVideos": "বাসার ভিডিও",
+ "HeaderNextUp": "এরপরে আসছে",
+ "HeaderLiveTV": "লাইভ টিভি",
+ "HeaderFavoriteSongs": "প্রিয় গানগুলো",
+ "HeaderFavoriteShows": "প্রিয় শোগুলো"
+}
diff --git a/Emby.Server.Implementations/Localization/Core/es_DO.json b/Emby.Server.Implementations/Localization/Core/es_DO.json
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/Emby.Server.Implementations/Localization/Core/es_DO.json
@@ -0,0 +1 @@
+{}
diff --git a/Emby.Server.Implementations/Localization/Core/fi.json b/Emby.Server.Implementations/Localization/Core/fi.json
index 7d6ca0d79..d02f841fd 100644
--- a/Emby.Server.Implementations/Localization/Core/fi.json
+++ b/Emby.Server.Implementations/Localization/Core/fi.json
@@ -13,13 +13,13 @@
"MessageApplicationUpdatedTo": "Jellyfin palvelin on päivitetty versioon {0}",
"MessageApplicationUpdated": "Jellyfin palvelin on päivitetty",
"Latest": "Viimeisin",
- "LabelRunningTimeValue": "Kesto: {0}",
+ "LabelRunningTimeValue": "Toiston kesto: {0}",
"LabelIpAddressValue": "IP-osoite: {0}",
"ItemRemovedWithName": "{0} poistettiin kirjastosta",
"ItemAddedWithName": "{0} lisättiin kirjastoon",
"Inherit": "Periä",
"HomeVideos": "Kotivideot",
- "HeaderRecordingGroups": "Äänitysryhmä",
+ "HeaderRecordingGroups": "Äänitysryhmät",
"HeaderNextUp": "Seuraavaksi",
"HeaderFavoriteSongs": "Lempikappaleet",
"HeaderFavoriteShows": "Lempisarjat",
diff --git a/Emby.Server.Implementations/Localization/Core/hu.json b/Emby.Server.Implementations/Localization/Core/hu.json
index 3a6852321..950be68d0 100644
--- a/Emby.Server.Implementations/Localization/Core/hu.json
+++ b/Emby.Server.Implementations/Localization/Core/hu.json
@@ -1,7 +1,7 @@
{
"Albums": "Albumok",
"AppDeviceValues": "Program: {0}, Eszköz: {1}",
- "Application": "Program",
+ "Application": "Alkalmazás",
"Artists": "Előadók",
"AuthenticationSucceededWithUserName": "{0} sikeresen azonosítva",
"Books": "Könyvek",
@@ -17,7 +17,7 @@
"Genres": "Műfajok",
"HeaderAlbumArtists": "Album előadók",
"HeaderCameraUploads": "Kamera feltöltések",
- "HeaderContinueWatching": "Folyamatban lévő filmek",
+ "HeaderContinueWatching": "Megtekintés folytatása",
"HeaderFavoriteAlbums": "Kedvenc albumok",
"HeaderFavoriteArtists": "Kedvenc előadók",
"HeaderFavoriteEpisodes": "Kedvenc epizódok",
@@ -27,7 +27,7 @@
"HeaderNextUp": "Következik",
"HeaderRecordingGroups": "Felvételi csoportok",
"HomeVideos": "Házi videók",
- "Inherit": "Inherit",
+ "Inherit": "Öröklés",
"ItemAddedWithName": "{0} hozzáadva a könyvtárhoz",
"ItemRemovedWithName": "{0} eltávolítva a könyvtárból",
"LabelIpAddressValue": "IP cím: {0}",
@@ -42,7 +42,7 @@
"Music": "Zene",
"MusicVideos": "Zenei videók",
"NameInstallFailed": "{0} sikertelen telepítés",
- "NameSeasonNumber": "Évad {0}",
+ "NameSeasonNumber": "{0}. évad",
"NameSeasonUnknown": "Ismeretlen évad",
"NewVersionIsAvailable": "Letölthető a Jellyfin Szerver új verziója.",
"NotificationOptionApplicationUpdateAvailable": "Frissítés érhető el az alkalmazáshoz",
diff --git a/Emby.Server.Implementations/Localization/Core/id.json b/Emby.Server.Implementations/Localization/Core/id.json
index 13415eda5..38c6cf54f 100644
--- a/Emby.Server.Implementations/Localization/Core/id.json
+++ b/Emby.Server.Implementations/Localization/Core/id.json
@@ -86,5 +86,10 @@
"FailedLoginAttemptWithUserName": "Percobaan login gagal dari {0}",
"CameraImageUploadedFrom": "Sebuah gambar baru telah diunggah dari {0}",
"DeviceOfflineWithName": "{0} telah terputus",
- "DeviceOnlineWithName": "{0} telah terhubung"
+ "DeviceOnlineWithName": "{0} telah terhubung",
+ "NotificationOptionVideoPlaybackStopped": "Pemutaran video berhenti",
+ "NotificationOptionVideoPlayback": "Pemutaran video dimulai",
+ "NotificationOptionAudioPlaybackStopped": "Pemutaran audio berhenti",
+ "NotificationOptionAudioPlayback": "Pemutaran audio dimulai",
+ "MixedContent": "Konten campur"
}
diff --git a/MediaBrowser.Api/Sessions/ApiKeyService.cs b/MediaBrowser.Api/Sessions/ApiKeyService.cs
new file mode 100644
index 000000000..5102ce0a7
--- /dev/null
+++ b/MediaBrowser.Api/Sessions/ApiKeyService.cs
@@ -0,0 +1,85 @@
+using System;
+using System.Globalization;
+using MediaBrowser.Controller;
+using MediaBrowser.Controller.Configuration;
+using MediaBrowser.Controller.Net;
+using MediaBrowser.Controller.Security;
+using MediaBrowser.Controller.Session;
+using MediaBrowser.Model.Services;
+using Microsoft.Extensions.Logging;
+
+namespace MediaBrowser.Api.Sessions
+{
+ [Route("/Auth/Keys", "GET")]
+ [Authenticated(Roles = "Admin")]
+ public class GetKeys
+ {
+ }
+
+ [Route("/Auth/Keys/{Key}", "DELETE")]
+ [Authenticated(Roles = "Admin")]
+ public class RevokeKey
+ {
+ [ApiMember(Name = "Key", Description = "Authentication key", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")]
+ public string Key { get; set; }
+ }
+
+ [Route("/Auth/Keys", "POST")]
+ [Authenticated(Roles = "Admin")]
+ public class CreateKey
+ {
+ [ApiMember(Name = "App", Description = "Name of the app using the authentication key", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
+ public string App { get; set; }
+ }
+
+ public class ApiKeyService : BaseApiService
+ {
+ private readonly ISessionManager _sessionManager;
+
+ private readonly IAuthenticationRepository _authRepo;
+
+ private readonly IServerApplicationHost _appHost;
+
+ public ApiKeyService(
+ ILogger<ApiKeyService> logger,
+ IServerConfigurationManager serverConfigurationManager,
+ IHttpResultFactory httpResultFactory,
+ ISessionManager sessionManager,
+ IServerApplicationHost appHost,
+ IAuthenticationRepository authRepo)
+ : base(logger, serverConfigurationManager, httpResultFactory)
+ {
+ _sessionManager = sessionManager;
+ _authRepo = authRepo;
+ _appHost = appHost;
+ }
+
+ public void Delete(RevokeKey request)
+ {
+ _sessionManager.RevokeToken(request.Key);
+ }
+
+ public void Post(CreateKey request)
+ {
+ _authRepo.Create(new AuthenticationInfo
+ {
+ AppName = request.App,
+ AccessToken = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture),
+ DateCreated = DateTime.UtcNow,
+ DeviceId = _appHost.SystemId,
+ DeviceName = _appHost.FriendlyName,
+ AppVersion = _appHost.ApplicationVersionString
+ });
+ }
+
+ public object Get(GetKeys request)
+ {
+ var result = _authRepo.Get(new AuthenticationInfoQuery
+ {
+ HasUser = false
+ });
+
+ return result;
+ }
+ }
+}
diff --git a/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs b/MediaBrowser.Api/Sessions/SessionInfoWebSocketListener.cs
index f1a6622fb..051d09850 100644
--- a/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs
+++ b/MediaBrowser.Api/Sessions/SessionInfoWebSocketListener.cs
@@ -5,7 +5,7 @@ using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Session;
using Microsoft.Extensions.Logging;
-namespace MediaBrowser.Api.Session
+namespace MediaBrowser.Api.Sessions
{
/// <summary>
/// Class SessionInfoWebSocketListener
diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Sessions/SessionService.cs
index 054371321..020bb5042 100644
--- a/MediaBrowser.Api/Session/SessionsService.cs
+++ b/MediaBrowser.Api/Sessions/SessionService.cs
@@ -1,21 +1,18 @@
using System;
-using System.Globalization;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net;
-using MediaBrowser.Controller.Security;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Services;
using MediaBrowser.Model.Session;
using Microsoft.Extensions.Logging;
-namespace MediaBrowser.Api.Session
+namespace MediaBrowser.Api.Sessions
{
/// <summary>
/// Class GetSessions.
@@ -24,10 +21,10 @@ namespace MediaBrowser.Api.Session
[Authenticated]
public class GetSessions : IReturn<SessionInfo[]>
{
- [ApiMember(Name = "ControllableByUserId", Description = "Optional. Filter by sessions that a given user is allowed to remote control.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
+ [ApiMember(Name = "ControllableByUserId", Description = "Filter by sessions that a given user is allowed to remote control.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public Guid ControllableByUserId { get; set; }
- [ApiMember(Name = "DeviceId", Description = "Optional. Filter by device id.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
+ [ApiMember(Name = "DeviceId", Description = "Filter by device Id.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public string DeviceId { get; set; }
public int? ActiveWithinSeconds { get; set; }
@@ -182,7 +179,7 @@ namespace MediaBrowser.Api.Session
[ApiMember(Name = "Id", Description = "Session Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
public string Id { get; set; }
- [ApiMember(Name = "UserId", Description = "UserId Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
+ [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
public string UserId { get; set; }
}
@@ -247,12 +244,6 @@ namespace MediaBrowser.Api.Session
{
}
- [Route("/Auth/Keys", "GET")]
- [Authenticated(Roles = "Admin")]
- public class GetApiKeys
- {
- }
-
[Route("/Auth/Providers", "GET")]
[Authenticated(Roles = "Admin")]
public class GetAuthProviders : IReturn<NameIdPair[]>
@@ -265,26 +256,10 @@ namespace MediaBrowser.Api.Session
{
}
- [Route("/Auth/Keys/{Key}", "DELETE")]
- [Authenticated(Roles = "Admin")]
- public class RevokeKey
- {
- [ApiMember(Name = "Key", Description = "Auth Key", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")]
- public string Key { get; set; }
- }
-
- [Route("/Auth/Keys", "POST")]
- [Authenticated(Roles = "Admin")]
- public class CreateKey
- {
- [ApiMember(Name = "App", Description = "App", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
- public string App { get; set; }
- }
-
/// <summary>
/// Class SessionsService.
/// </summary>
- public class SessionsService : BaseApiService
+ public class SessionService : BaseApiService
{
/// <summary>
/// The session manager.
@@ -293,20 +268,16 @@ namespace MediaBrowser.Api.Session
private readonly IUserManager _userManager;
private readonly IAuthorizationContext _authContext;
- private readonly IAuthenticationRepository _authRepo;
private readonly IDeviceManager _deviceManager;
private readonly ISessionContext _sessionContext;
- private readonly IServerApplicationHost _appHost;
- public SessionsService(
- ILogger<SessionsService> logger,
+ public SessionService(
+ ILogger<SessionService> logger,
IServerConfigurationManager serverConfigurationManager,
IHttpResultFactory httpResultFactory,
ISessionManager sessionManager,
- IServerApplicationHost appHost,
IUserManager userManager,
IAuthorizationContext authContext,
- IAuthenticationRepository authRepo,
IDeviceManager deviceManager,
ISessionContext sessionContext)
: base(logger, serverConfigurationManager, httpResultFactory)
@@ -314,10 +285,8 @@ namespace MediaBrowser.Api.Session
_sessionManager = sessionManager;
_userManager = userManager;
_authContext = authContext;
- _authRepo = authRepo;
_deviceManager = deviceManager;
_sessionContext = sessionContext;
- _appHost = appHost;
}
public object Get(GetAuthProviders request)
@@ -330,25 +299,6 @@ namespace MediaBrowser.Api.Session
return _userManager.GetPasswordResetProviders();
}
- public void Delete(RevokeKey request)
- {
- _sessionManager.RevokeToken(request.Key);
-
- }
-
- public void Post(CreateKey request)
- {
- _authRepo.Create(new AuthenticationInfo
- {
- AppName = request.App,
- AccessToken = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture),
- DateCreated = DateTime.UtcNow,
- DeviceId = _appHost.SystemId,
- DeviceName = _appHost.FriendlyName,
- AppVersion = _appHost.ApplicationVersionString
- });
- }
-
public void Post(ReportSessionEnded request)
{
var auth = _authContext.GetAuthorizationInfo(Request);
@@ -356,16 +306,6 @@ namespace MediaBrowser.Api.Session
_sessionManager.Logout(auth.Token);
}
- public object Get(GetApiKeys request)
- {
- var result = _authRepo.Get(new AuthenticationInfoQuery
- {
- HasUser = false
- });
-
- return result;
- }
-
/// <summary>
/// Gets the specified request.
/// </summary>