We have the following ASP.NET MVC 5 web application >> and we authenticate the users against an LDAP using this method:-
[HttpPost]
        [AllowAnonymous]
        [ValidateInput(false)]
        public ActionResult Login(LoginModel model, string returnUrl)
        {
            MembershipProvider domainProvider;
            domainProvider = Membership.Providers["TestDomain1ADMembershipProvider"];
            if (ModelState.IsValid)
            {
                // Validate the user with the membership system.
                if (domainProvider.ValidateUser(model.UserName, model.Password))
                {
                    
                    FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe);
                    RedirectToAction("Index","Home");
                   
                }
                else
                {
                  
                    ModelState.AddModelError("", "The user name or password provided is incorrect.");
                   
                    return View(model);
                }
                
          
                
            }
           
            return View(model);
        }
and here is the provider inside the web.config:-
<membership>
      <providers>
        <add name="TestDomain1ADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=4.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="TestDomain1ConnectionString" connectionUsername="Administrator" connectionPassword="*****" attributeMapUsername="sAMAccountName"/>
       
      </providers>
    </membership>
<connectionStrings>
    <add name="TestDomain1ConnectionString" connectionString="LDAP://mydomain.com/CN=Users,DC=mydomain,DC=com"/>
  </connectionStrings>
my question is; if we can use the same approach to authenticate our users if we upgrade our web application from ASP.NET MVC-5 to ASP.NET Core MVC 3.1 ? If the answer is not, then what we can use to authenticate users using LDAP?
Thanks