コード例 #1
0
 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));
 }
コード例 #2
0
 /// <summary>
 /// This module requires authentication
 /// </summary>
 /// <param name="module">Module to enable</param>
 public static void RequiresAuthentication(this NancyModule module)
 {
     module.AddBeforeHookOrExecute(RequiresAuthentication);
 }
コード例 #3
0
 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));
 }
コード例 #4
0
 public static void CreateValidationFailureResponse <T>(this NancyModule module,
                                                        ValidationResult validationResult)
 {
     module.AddBeforeHookOrExecute(CreateValidationFailureResponse <T>(validationResult));
 }