title: Where is the Identity (Token) Login httppost action method in Web API project?
body: <p>In MVC project (.NET Framework), the Scaffolding Identity Login action method is below:</p>
  
  <pre><code>// POST: /Account/Login
  [HttpPost]
  [AllowAnonymous]
  [ValidateAntiForgeryToken]
  public async Task&lt;ActionResult&gt; Login(LoginViewModel model, string returnUrl)
  {
      if (!ModelState.IsValid)
      {
          return View(model);
      }
  
      // This doesn't count login failures towards account lockout
      // To enable password failures to trigger account lockout, change to shouldLockout: true
      var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);
      switch (result)
      {
          case SignInStatus.Success:
              return RedirectToLocal(returnUrl);
          case SignInStatus.LockedOut:
              return View("Lockout");
          case SignInStatus.RequiresVerification:
              return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.RememberMe });
          case SignInStatus.Failure:
          default:
              ModelState.AddModelError("", "Invalid login attempt.");
              return View(model);
      }
  }
  </code></pre>
  
  <p>But I seem could not find the Scaffolding Identity Login action method in <strong>Web API</strong> project (.NET Framework). I search for <code>SignInManager</code> or <code>PasswordSignInAsync</code> as keyword but could not find any. I could find <code>AddExternalLogin</code> but this method take <code>AddExternalLoginBindingModel</code> as parameter which is not username, email and password.</p>
  
  <pre><code>public class AddExternalLoginBindingModel
  {
      [Required]
      [Display(Name = "External access token")]
      public string ExternalAccessToken { get; set; }
  }
  </code></pre>
  
  <p>After some read up, I notice that if the client is using Javascript to call the Web API login method, it is going to something like <code>https://localhost:44358/api/Token</code> but I can't this <code>Token</code> method in Web Api Scaffolding Identity controller.</p>