This commit is contained in:
Hukuta committed 2026-04-01 13:26:25 +09:00
1 parent 3c006b8c6d
commit 86e759bde7
25 files changed
+339 -360

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
using Novell.Directory.Ldap;
namespace CartriX.Server.Controllers
{
public class CheckDomain
{
public bool Authenticate(string username, string password)
{
try
{
using (var conn = new LdapConnection())
{
conn.Connect("your-domain.local", 389);
conn.Bind($"{username}@your-domain.local", password);
return true;
}
}
catch
{
return false;
}
}
}
}