public SecureModule() : base("/secure") { this.RequiresAuthentication(); Get["/"] = x => { var model = new UserModel(this.Context.CurrentUser.Identity.Name); return View["secure.cshtml", model]; }; }
public PartlySecureModule() : base("/partlysecure") { Get("/", args => "No auth needed! <a href='partlysecure/secured'>Enter the secure bit!</a>"); Get("/secured", args => { this.RequiresAuthentication(); var model = new UserModel(this.Context.CurrentUser.Identity.Name); return View["secure.cshtml", model]; }); }