aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Security/AuthenticationRepository.cs
diff options
context:
space:
mode:
authorNyanmisaka <nst799610810@gmail.com>2020-06-25 16:37:40 +0800
committerGitHub <noreply@github.com>2020-06-25 16:37:40 +0800
commit912946a42793305ecdc6a8c176f1775ffe7ac0de (patch)
tree6a4d85c4869ed8cb5d15f3fa8c82512de6405b6e /Emby.Server.Implementations/Security/AuthenticationRepository.cs
parentbfd87829e3bca42a245287b99e652d091b21c990 (diff)
parent91c51ae6752720d6272e6a0c651edd3780e150ac (diff)
Merge pull request from jellyfin/master
Diffstat (limited to 'Emby.Server.Implementations/Security/AuthenticationRepository.cs')
-rw-r--r--Emby.Server.Implementations/Security/AuthenticationRepository.cs14
1 files changed, 6 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/Security/AuthenticationRepository.cs b/Emby.Server.Implementations/Security/AuthenticationRepository.cs
index 1ef5c4b99..4dfadc703 100644
--- a/Emby.Server.Implementations/Security/AuthenticationRepository.cs
+++ b/Emby.Server.Implementations/Security/AuthenticationRepository.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -15,8 +17,8 @@ namespace Emby.Server.Implementations.Security
{
public class AuthenticationRepository : BaseSqliteRepository, IAuthenticationRepository
{
- public AuthenticationRepository(ILoggerFactory loggerFactory, IServerConfigurationManager config)
- : base(loggerFactory.CreateLogger(nameof(AuthenticationRepository)))
+ public AuthenticationRepository(ILogger<AuthenticationRepository> logger, IServerConfigurationManager config)
+ : base(logger)
{
DbFilePath = Path.Combine(config.ApplicationPaths.DataPath, "authentication.db");
}
@@ -59,7 +61,6 @@ namespace Emby.Server.Implementations.Security
AddColumn(db, "AccessTokens", "UserName", "TEXT", existingColumnNames);
AddColumn(db, "AccessTokens", "DateLastActivity", "DATETIME", existingColumnNames);
AddColumn(db, "AccessTokens", "AppVersion", "TEXT", existingColumnNames);
-
}, TransactionMode);
connection.RunQueries(new[]
@@ -97,7 +98,7 @@ namespace Emby.Server.Implementations.Security
statement.TryBind("@AppName", info.AppName);
statement.TryBind("@AppVersion", info.AppVersion);
statement.TryBind("@DeviceName", info.DeviceName);
- statement.TryBind("@UserId", (info.UserId.Equals(Guid.Empty) ? null : info.UserId.ToString("N", CultureInfo.InvariantCulture)));
+ statement.TryBind("@UserId", info.UserId.Equals(Guid.Empty) ? null : info.UserId.ToString("N", CultureInfo.InvariantCulture));
statement.TryBind("@UserName", info.UserName);
statement.TryBind("@IsActive", true);
statement.TryBind("@DateCreated", info.DateCreated.ToDateTimeParamValue());
@@ -105,7 +106,6 @@ namespace Emby.Server.Implementations.Security
statement.MoveNext();
}
-
}, TransactionMode);
}
}
@@ -131,7 +131,7 @@ namespace Emby.Server.Implementations.Security
statement.TryBind("@AppName", info.AppName);
statement.TryBind("@AppVersion", info.AppVersion);
statement.TryBind("@DeviceName", info.DeviceName);
- statement.TryBind("@UserId", (info.UserId.Equals(Guid.Empty) ? null : info.UserId.ToString("N", CultureInfo.InvariantCulture)));
+ statement.TryBind("@UserId", info.UserId.Equals(Guid.Empty) ? null : info.UserId.ToString("N", CultureInfo.InvariantCulture));
statement.TryBind("@UserName", info.UserName);
statement.TryBind("@DateCreated", info.DateCreated.ToDateTimeParamValue());
statement.TryBind("@DateLastActivity", info.DateLastActivity.ToDateTimeParamValue());
@@ -365,7 +365,6 @@ namespace Emby.Server.Implementations.Security
return result;
}
-
}, ReadTransactionMode);
}
}
@@ -396,7 +395,6 @@ namespace Emby.Server.Implementations.Security
statement.MoveNext();
}
-
}, TransactionMode);
}
}