feat(ActiveDirectoryOptions): AuthenticationType-Eigenschaft hinzufügen
- AuthenticationType-Eigenschaft zu SearchRoot in DirectorySearchQueryHandler hinzufügen
This commit is contained in:
@@ -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 class ActiveDirectoryOptions
|
||||||
{
|
{
|
||||||
public string Path { get; set; } = null!;
|
public string Path { get; set; } = null!;
|
||||||
@@ -7,4 +10,6 @@ public class ActiveDirectoryOptions
|
|||||||
public string Username { get; set; } = null!;
|
public string Username { get; set; } = null!;
|
||||||
|
|
||||||
public string Password { get; set; } = null!;
|
public string Password { get; set; } = null!;
|
||||||
|
|
||||||
|
public IEnumerable<AuthenticationTypes> AuthenticationType { get; set; } = new List<AuthenticationTypes>() { AuthenticationTypes.None };
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,8 @@ public class DirectorySearchQueryHandler : IRequestHandler<DirectorySearchQuery,
|
|||||||
{
|
{
|
||||||
Path = _options.Value.Path,
|
Path = _options.Value.Path,
|
||||||
Username = _options.Value.Username,
|
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);
|
request.AfterInit?.Invoke(searcher);
|
||||||
|
|||||||
Reference in New Issue
Block a user