Implements file hashing media library scan job

This commit is contained in:
BinaryAlley committed 2025-03-01 16:44:10 +02:00
1 parent 66998055f0
commit 03a000e1e4
63 files changed
+2009 -287

No files matched your search

@@ -25,7 +25,7 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Setup;
[ExcludeFromCodeCoverage]
public class AuthenticatedLuminaApiFactory : LuminaApiFactory, IDisposable
{
private readonly HashService _hashService;
private readonly PasswordHashService _hashService;
private readonly JsonSerializerOptions _jsonOptions = new()
{
PropertyNameCaseInsensitive = true
@@ -41,7 +41,7 @@ public class AuthenticatedLuminaApiFactory : LuminaApiFactory, IDisposable
/// </summary>
public AuthenticatedLuminaApiFactory()
{
_hashService = new HashService();
_hashService = new PasswordHashService();
}
/// <summary>
@@ -112,7 +112,7 @@ public class CheckInitializationEndpointTests : IClassFixture<AuthenticatedLumin
UserEntity user = new()
{
Username = _testUsername,
Password = new HashService().HashString("TestPass123!"),
Password = new PasswordHashService().HashString("TestPass123!"),
Libraries = [],
UserPermissions = [],
UserRole = null,
@@ -215,7 +215,7 @@ public class SetupApplicationEndpointTests : IClassFixture<AuthenticatedLuminaAp
UserEntity user = new()
{
Username = _testUsername,
Password = new HashService().HashString("TestPass123!"),
Password = new PasswordHashService().HashString("TestPass123!"),
Libraries = [],
UserPermissions = [],
UserRole = null, // TODO: test default role and permissions?
@@ -32,7 +32,7 @@ public class LoginEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory>,
{
private HttpClient _client;
private readonly AuthenticatedLuminaApiFactory _apiFactory;
private readonly HashService _hashService;
private readonly PasswordHashService _hashService;
private readonly ICryptographyService _cryptographyService;
private readonly TotpTokenGenerator _totpTokenGenerator;
private readonly JsonSerializerOptions _jsonOptions = new()
@@ -50,7 +50,7 @@ public class LoginEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory>,
{
_client = apiFactory.CreateClient();
_apiFactory = apiFactory;
_hashService = new HashService();
_hashService = new PasswordHashService();
_totpTokenGenerator = new TotpTokenGenerator();
_testUsername = $"testuser_{Guid.NewGuid()}";
@@ -34,7 +34,7 @@ public class RecoverPasswordEndpointTests : IClassFixture<AuthenticatedLuminaApi
{
private HttpClient _client;
private readonly AuthenticatedLuminaApiFactory _apiFactory;
private readonly HashService _hashService;
private readonly PasswordHashService _hashService;
private readonly ICryptographyService _cryptographyService;
private readonly TotpTokenGenerator _totpTokenGenerator;
private readonly JsonSerializerOptions _jsonOptions = new()
@@ -52,7 +52,7 @@ public class RecoverPasswordEndpointTests : IClassFixture<AuthenticatedLuminaApi
{
_client = apiFactory.CreateClient();
_apiFactory = apiFactory;
_hashService = new HashService();
_hashService = new PasswordHashService();
_totpTokenGenerator = new TotpTokenGenerator();
_testUsername = $"testuser_{Guid.NewGuid()}";
@@ -194,7 +194,7 @@ public class RegisterEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
UserEntity user = new()
{
Username = _testUsername,
Password = new HashService().HashString("TestPass123!"),
Password = new PasswordHashService().HashString("TestPass123!"),
Libraries = [],
UserPermissions = [],
UserRole = null,