public ActionResult Index(FormCollection form, LdapConfiguration model) { var email = form["email"]; var password = form["password"]; if (ModelState.IsValid && !string.IsNullOrEmpty(email) && !string.IsNullOrEmpty(password)) { var objLdap = new LdapManager(model); if (objLdap.Authenticate(email, password)) { TempData["Message"] = "Connection sucessful establish."; } else { ModelState.AddModelError("",@"Test failed"); } } else { ModelState.AddModelError("",@"Please input username password"); } return View("Index"); }
public CorpLdapDataController(ClientManager clientManager, DirectoryManager directoryManager, SecurityPoolManager poolManager, RoleManager roleManager, LdapManager ldapManager) { _clientManager = clientManager; _directoryManager = directoryManager; _poolManager = poolManager; _roleManager = roleManager; _ldapManager = ldapManager; }
public SignInController(IConfigurationFacade facade, LdapManager ldapManager) { _facade = facade; _ldapManager = ldapManager; }
public CorpLdapDetails(DirectoryManager directoryManager, LdapManager ldapManager) { _directoryManager = directoryManager; _ldapManager = ldapManager; }