public EducationSecurityPrincipal(EducationSecurityIdentity identity)
 {
     if (identity == null)
     {
         throw new ArgumentNullException("identity");
     }
     Identity      = identity;
     Configuration = new DefaultSecurityConfiguration();
 }
 public EducationSecurityPrincipal(EducationSecurityIdentity identity)
 {
     if (identity == null)
     {
         throw new ArgumentNullException("identity");
     }
     Identity = identity;
     Configuration = new DefaultSecurityConfiguration();
 }
 public EducationSecurityPrincipal(User userEntity)
 {
     if (userEntity == null)
     {
         throw new ArgumentNullException("userEntity");
     }
     if (userEntity.UserKey == null)
     {
         throw new ArgumentException("UserKey property cannot be null.", "userEntity");
     }
     Claim claim = new Claim(ClaimTypes.NameIdentifier, userEntity.UserKey);
     Identity = new EducationSecurityIdentity(new ClaimsIdentity(new List<Claim> { claim }, "Custom"), userEntity);
     Configuration = new DefaultSecurityConfiguration();
 }
        public EducationSecurityPrincipal(User userEntity)
        {
            if (userEntity == null)
            {
                throw new ArgumentNullException("userEntity");
            }
            if (userEntity.UserKey == null)
            {
                throw new ArgumentException("UserKey property cannot be null.", "userEntity");
            }
            Claim claim = new Claim(ClaimTypes.NameIdentifier, userEntity.UserKey);

            Identity = new EducationSecurityIdentity(new ClaimsIdentity(new List <Claim> {
                claim
            }, "Custom"), userEntity);
            Configuration = new DefaultSecurityConfiguration();
        }
 public void InitializeTest()
 {
     ConfigurationManager.AppSettings.Set("AdministratorEmailAddresses", "");
     Target = new DefaultSecurityConfiguration();
 }