Example #1
0
        private bool IsValidSrcIP(RequiredDetails details, ExaminationFilterRule rule, string srcIP)
        {
            if (rule.AllowSpecificIPs == false) //no filteration required
            {
                return(true);
            }

            foreach (var ipRule in rule.AllowedIPs)
            {
                if (srcIP == ipRule) // TODO:: implement subnets filteration
                {
                    return(true);
                }
            }
            return(false);
        }
Example #2
0
 /// <summary>
 /// this method protects against impersonation
 /// </summary>
 /// <param name="details"></param>
 /// <param name="rule"></param>
 /// <returns></returns>
 private bool IsValidStudentID(RequiredDetails details, ExaminationFilterRule rule)
 {
     return(details.StudentID == details.StudentID);
 }
Example #3
0
        private bool IsValidSharedKeyIS(RequiredDetails details, ExaminationFilterRule rule)
        {
            details.DecryptSharedKey(rule.SharedKeyIS);

            return(details.SharedKeyIS == rule.SharedKeyIS);
        }