title: MVC (ASP.NET Identity) custom Signin Status with Entity Framework
body: <p>I have an existing database using Entity Framework. Registration and Login works, but I would like to add an additional status to the Signin Statuses : UnAuthorized.</p>
  
  <p>Below is the code for logging in :</p>
  
  <pre><code>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.UserName, model.Password, model.RememberMe, shouldLockout: false);
            switch (result)
              {
                case SignInStatus.Success:
                    return RedirectToLocal(returnUrl);
                'case SignInStatus.UnAuthorized:
                    return View("UnAuthorized");' //I want to add this
                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>I have added the part in the code snippet above to show you what I want. I found the statuses used above. provided in the code snippet below, but I am not able to modify this file :</p>
  
  <pre><code>namespace Microsoft.AspNet.Identity.Owin
  {
      //
      // Summary:
      //     Possible results from a sign in attempt
      public enum SignInStatus
      {
          //
          // Summary:
          //     Sign in was successful
          Success = 0,
          //
          // Summary:
          //     User is locked out
          LockedOut = 1,
          //
          // Summary:
          //     Sign in requires addition verification (i.e. two factor)
          RequiresVerification = 2,
          //
          // Summary:
          //     Sign in failed
          Failure = 3
      }
  } 
  </code></pre>
  
  <p>I might add that I am new to MVC.</p>
  
  <p>Could anyone point me into the right direction to be able to add custom signin statuses ? PS: An Authorized field does exist in my DB, which is where I want to pick up if the User is Authorized or not to log in.</p>
  
  <p>Thanks for the help.</p>