To mark a controller to be accessed only by a logged in user, we can use
public class AuthorizeController : Controller
public ActionResult Index()
Above controller action method will only be accessible to those user who are logged in to the application. Despite Index method doesn’t have
Authorize attribute but this method will not be available to the anonymous user as the Authorize attribute is written at the Controller level so all action method inside the controller will be secure.