public static void RequiresPermissionsAndClaims <T>(this NancyModule module, string name, IEnumerable <string> permissions, string grain, string securableItem, params Predicate <Claim>[] requiredClaims) { module.RequiresClaims(requiredClaims); module.AddBeforeHookOrExecute(RequiresPermissions <T>(name, permissions, grain, securableItem)); }
/// <summary> /// This module requires authentication /// </summary> /// <param name="module">Module to enable</param> public static void RequiresAuthentication(this NancyModule module) { module.AddBeforeHookOrExecute(RequiresAuthentication); }
public static void RequiresOwnershipAndClaims <T>(this NancyModule module, bool doesClientOwnItem, string grain, string securableItem, params Predicate <Claim>[] requiredClaims) { module.RequiresClaims(requiredClaims); module.AddBeforeHookOrExecute(RequiresOwnership <T>(doesClientOwnItem, grain, securableItem)); }
public static void CreateValidationFailureResponse <T>(this NancyModule module, ValidationResult validationResult) { module.AddBeforeHookOrExecute(CreateValidationFailureResponse <T>(validationResult)); }