feat(ActiveDirectoryOptions): AuthenticationType-Eigenschaft hinzufügen

- AuthenticationType-Eigenschaft zu SearchRoot in DirectorySearchQueryHandler hinzufügen
This commit is contained in:
Developer 02
2025-08-06 17:43:39 +02:00
parent a34d19e1bd
commit 6215642fcf
2 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
namespace DigitalData.ActiveDirectory;
using System.DirectoryServices;
namespace DigitalData.ActiveDirectory;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>")]
public class ActiveDirectoryOptions
{
public string Path { get; set; } = null!;
@@ -7,4 +10,6 @@ public class ActiveDirectoryOptions
public string Username { get; set; } = null!;
public string Password { get; set; } = null!;
public IEnumerable<AuthenticationTypes> AuthenticationType { get; set; } = new List<AuthenticationTypes>() { AuthenticationTypes.None };
}

View File

@@ -40,7 +40,8 @@ public class DirectorySearchQueryHandler : IRequestHandler<DirectorySearchQuery,
{
Path = _options.Value.Path,
Username = _options.Value.Username,
Password = _options.Value.Password
Password = _options.Value.Password,
AuthenticationType = _options.Value.AuthenticationType.Aggregate((a, b) => a | b)
};
request.AfterInit?.Invoke(searcher);