Example #1
0
 //- @Invoke -//
 public Object Invoke(Object instance, Object[] inputs, out Object[] outputs)
 {
     //+ authorization
     try
     {
         if (this.PermissionLevel == Minima.Service.PermissionLevel.Blog)
         {
             String blogGuid = MinimaMessageHeaderHelper.GetBlogGuidFromMessageHeader();
             SecurityValidator.ValidateBlogPermission(this.PermissionRequired, blogGuid);
         }
         else if (this.PermissionLevel == Minima.Service.PermissionLevel.System)
         {
             SecurityValidator.ValidateSystemPermission(this.PermissionRequired);
         }
     }
     catch (SecurityException exception)
     {
         FaultThrower.Throw <SecurityException>(exception);
     }
     catch (ArgumentException exception)
     {
         FaultThrower.Throw <ArgumentException>(exception);
     }
     //+
     return(InnerOperationInvoker.Invoke(instance, inputs, out outputs));
 }
Example #2
0
 //- @Validate -//
 public override void Validate(String userName, String password)
 {
     try
     {
         SecurityValidator.ValidateUserNameAndPassword(userName, password);
     }
     catch (SecurityException exception)
     {
         FaultThrower.Throw <SecurityException>(exception);
     }
     catch (ArgumentException exception)
     {
         FaultThrower.Throw <ArgumentException>(exception);
     }
 }