Exemplo n.º 1
0
        public static int UserRegistrationConfirmation(ThisUser entity, string type)
        {
            string server = UtilityManager.GetAppKeyValue("serverName", "");
            //EFDAL.IsleContentEntities ctx = new EFDAL.IsleContentEntities();
            SiteActivity log = new SiteActivity();

            try
            {
                log.CreatedDate  = System.DateTime.Now;
                log.ActivityType = "Audit";
                log.Activity     = "Account";
                log.Event        = "Confirmation";
                log.Comment      = string.Format("{0} ({1}) Registration Confirmation, on server: {2}, tyep: {3}", entity.FullName(), entity.Id, server, type);
                //actor type - person, system
                log.ActionByUserId = entity.Id;
                log.TargetUserId   = entity.Id;

                log.SessionId = ActivityManager.GetCurrentSessionId();

                return(new ActivityManager().SiteActivityAdd(log));
            }
            catch (Exception ex)
            {
                LoggingHelper.LogError(ex, thisClassName + ".UserRegistrationConfirmation()");
                return(0);
            }
        }
Exemplo n.º 2
0
        public static int UserRegistration(ThisUser entity, string ipAddress, string type, string extra = "")
        {
            string server = UtilityManager.GetAppKeyValue("serverName", "");

            SiteActivity log = new SiteActivity();

            log.CreatedDate  = System.DateTime.Now;
            log.ActivityType = "Audit";
            log.Activity     = "Account";
            log.Event        = type;
            log.Comment      = string.Format("{0} ({1}) {4}. From IPAddress: {2}, on server: {3}. {5}", entity.FullName(), entity.Id, ipAddress, server, type, extra);
            //actor type - person, system
            log.ActionByUserId = entity.Id;
            log.TargetUserId   = entity.Id;
            log.SessionId      = ActivityManager.GetCurrentSessionId();
            try
            {
                return(new ActivityManager().SiteActivityAdd(log));
            }
            catch (Exception ex)
            {
                LoggingHelper.LogError(ex, thisClassName + ".UserRegistrationFromPortal()");
                return(0);
            }
        }
Exemplo n.º 3
0
        private static int UserAuthentication(ThisUser entity, string type)
        {
            string       server = UtilityManager.GetAppKeyValue("serverName", "");
            SiteActivity log    = new SiteActivity();

            log.CreatedDate  = System.DateTime.Now;
            log.ActivityType = "Audit";
            log.Activity     = "Account";
            log.Event        = "Authentication: " + type;
            log.Comment      = string.Format("{0} ({1}) logged in ({2}) on server: {3}", entity.FullName(), entity.Id, type, server);
            //actor type - person, system
            log.ActionByUserId = entity.Id;
            log.TargetUserId   = entity.Id;
            log.SessionId      = ActivityManager.GetCurrentSessionId();
            try
            {
                return(new ActivityManager().SiteActivityAdd(log));
            }
            catch (Exception ex)
            {
                LoggingHelper.LogError(ex, thisClassName + ".UserAuthentication()");
                return(0);
            }
        }
Exemplo n.º 4
0
 public static int UserRegistrationFromGoogle(ThisUser entity, string ipAddress)
 {
     return(UserRegistration(entity, ipAddress, "Google SSO Registration"));
 }
Exemplo n.º 5
0
 public static int UserExternalAuthentication(ThisUser entity, string provider)
 {
     return(UserAuthentication(entity, provider));
 }
Exemplo n.º 6
0
 /// <summary>
 /// form based login
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public static int UserAuthentication(ThisUser entity)
 {
     return(UserAuthentication(entity, "login"));
 }
Exemplo n.º 7
0
 public static int AdminLoginAsUserAuthentication(ThisUser entity)
 {
     return(UserAuthentication(entity, "Admin PASSKEY Login "));
 }