public SecureModule() : base("/secure") { this.RequiresAuthentication(); Get["/"] = x => { var model = new UserModel(this.Context.CurrentUser.Identity.Name); return View["secure.cshtml", model]; }; }
public AnotherVerySecureModule() : base("/superSecure") { this.RequiresClaims(c => c.Type == ClaimTypes.Role && c.Value == "SuperSecure"); Get["/"] = x => { var model = new UserModel(this.Context.CurrentUser.Identity.Name); return View["superSecure.cshtml", model]; }; }