aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server.Implementations/Security/AuthenticationManager.cs')
-rw-r--r--Jellyfin.Server.Implementations/Security/AuthenticationManager.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs b/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs
index 33c08c8c2..b2dfe60a1 100644
--- a/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs
+++ b/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs
@@ -10,13 +10,13 @@ namespace Jellyfin.Server.Implementations.Security
/// <inheritdoc />
public class AuthenticationManager : IAuthenticationManager
{
- private readonly IDbContextFactory<JellyfinDb> _dbProvider;
+ private readonly IDbContextFactory<JellyfinDbContext> _dbProvider;
/// <summary>
/// Initializes a new instance of the <see cref="AuthenticationManager"/> class.
/// </summary>
/// <param name="dbProvider">The database provider.</param>
- public AuthenticationManager(IDbContextFactory<JellyfinDb> dbProvider)
+ public AuthenticationManager(IDbContextFactory<JellyfinDbContext> dbProvider)
{
_dbProvider = dbProvider;
}
@@ -40,7 +40,6 @@ namespace Jellyfin.Server.Implementations.Security
await using (dbContext.ConfigureAwait(false))
{
return await dbContext.ApiKeys
- .AsAsyncEnumerable()
.Select(key => new AuthenticationInfo
{
AppName = key.Name,
@@ -60,12 +59,11 @@ namespace Jellyfin.Server.Implementations.Security
await using (dbContext.ConfigureAwait(false))
{
var key = await dbContext.ApiKeys
- .AsQueryable()
.Where(apiKey => apiKey.AccessToken == accessToken)
.FirstOrDefaultAsync()
.ConfigureAwait(false);
- if (key == null)
+ if (key is null)
{
return;
}