Right, you will use AuthorizeAttribute
, for example:
[Authorize] public ActionResult AuthenticatedUsers() { return View(); } [Authorize(Roles = "Role1, Role2")] public ActionResult SomeRoles() { return View(); } [Authorize(Users = "User1, User2")] public ActionResult SomeUsers() { return View(); }
As for the "auth status" state, I'm not sure I know what you mean. It seems that Roles
will handle this authentication requirement.
user596075
source share