title: .net Core Authentication
body: <p>I wanted to implement forms authentication with membership in my asp.net MVC Core application. 
  We had forms authentication setup in our previous application as below and wanted to use the same in .net core.</p>
  
  <pre><code>  [HttpPost]
  public ActionResult Login(LoginModel model, string returnUrl)
  {
    if (!this.ModelState.IsValid)
    {
        return this.View(model);
     }
  
     //Authenticate
     if (!Membership.ValidateUser(model.UserName, model.Password))
     {
         this.ModelState.AddModelError(string.Empty, "The user name or 
     password provided is incorrect.");
     return this.View(model);
     }
     else
     {
         FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe);
          return this.RedirectToAction("Index", "Home");
     }
   return this.View(model);
     }
  </code></pre>
  
  <p>In my config:</p>
  
  <pre><code>  &lt;membership defaultProvider="ADMembership"&gt;
         &lt;providers&gt;
           &lt;add name="ADMembership" 
             type="System.Web.Security.ActiveDirectoryMembershipProvider" 
             connectionStringName="ADConnectionString" 
             attributeMapUsername="sAMAccountName" /&gt;
         &lt;/providers&gt;
     &lt;/membership&gt;
  </code></pre>
  
  <p>So we are using active directory here in membership.</p>
  
  <p>Is this still applicable in .net core.</p>
  
  <p>If not what else is available in .net core for forms authentication and AD.</p>
  
  <p>Would appreciate inputs. </p>