Example #1
0
 public VerifyMessage Verify(IPayLoad pay)
 {
     VerifyMessage vf = new VerifyMessage();
     vf.IsSuccess = true;
     string url = pay.AbsoluteUri;
     if (!Regex.IsMatch(url, UrlPatten, RegexOptions.IgnoreCase))
     {
         vf.IsSuccess = false;
         vf.Message = UrlTemplate;
     }
     return vf;
 }
Example #2
0
 public VerifyMessage Verify(IPayLoad pay)
 {
     string rawUrl = pay.RawUrl;
     VerifyMessage vf = new VerifyMessage();
     vf.IsSuccess = true;
     if (rawUrl.IndexOf(LogoutFormat) >= 0)
     {
         Authorization.Instance.LogOut();
         vf.IsSuccess = false;              
     }
     return vf;
 }
Example #3
0
 public VerifyMessage Verify(IPayLoad pay)
 {
     VerifyMessage vf = new VerifyMessage();
     vf.IsSuccess = true;
     bool IsAuthorized = true;
     if (!(PermissionValidate.Instance.CheckViewIPPermission() || PermissionValidate.Instance.CheckChangeIPPermission()))
     {
         IsAuthorized = Authorization.Instance.Authorizate();
     }
     if (!IsAuthorized)
     {             
         vf.IsSuccess = false;
         vf.Message = "Sorry,Your IP Address Doesn't Have Update Permission.";
     }
     return vf;
 }
Example #4
0
 public VerifyMessage Verify(IPayLoad pay)
 {
     VerifyMessage vf = new VerifyMessage();
     vf.IsSuccess = true;
     string action = pay.Action;
     if (!PermissionValidate.Instance.IsInnerIp(IPHelper.GetClientIP()))
     {
         vf.IsSuccess = false;
         if (HostingEnvironment.IsHosted)
         {
             vf.Message = HostingEnvironment.ApplicationVirtualPath;
         }
         else
         {
             vf.Message = "Sorry,Your IP Address Doesn't Have " + action + " Permission.";
         }
     }
     return vf;
 }
Example #5
0
 public VerifyMessage Verify(IPayLoad pay)
 {
     VerifyMessage vf = new VerifyMessage();
     vf.IsSuccess = true;
     string action = pay.Action;
     bool isChange = action.Equals("update", StringComparison.Ordinal);
     if (isChange && !PermissionValidate.Instance.CheckChangePermission())
     {
         vf.IsSuccess = false;
         if (HostingEnvironment.IsHosted)
         {                 
             vf.Message = HostingEnvironment.ApplicationVirtualPath;
         }
         else
         {
             vf.Message = "Sorry,Your IP Address Doesn't Have " + action + " Permission.";
         }
     }
     return vf;
 }