Ejemplo n.º 1
0
        public UserUpdateSecurityQuestion(
            string email,
            CustomerOriginEnum?origin,
            DasKennwort password,
            int questionID,
            string answer
            )
        {
            ErrorMessage = null;

            this.securityData = new UserSecurityData(this)
            {
                Email            = email,
                OldPassword      = password.Decrypt(),
                PasswordQuestion = questionID,
                PasswordAnswer   = answer,
            };

            this.spLoad = new UserDataForLogin(DB, Log)
            {
                Email    = email,
                OriginID = (origin == null) ? (int?)null : (int)origin.Value,
            };

            this.spUpdate = new SpUserUpdateSecurityQuestion(DB, Log)
            {
                QuestionID = questionID,
                Answer     = answer,
            };
        }         // constructor
Ejemplo n.º 2
0
        public UserLogin(
            CustomerOriginEnum?originID,
            string sEmail,
            DasKennwort sPassword,
            string sRemoteIp,
            string promotionName,
            DateTime?promotionPageVisitTime
            )
        {
            m_oResult = null;

            sEmail = NormalizeUserName(sEmail);

            m_oData = new UserSecurityData(this)
            {
                Email       = sEmail,
                OldPassword = sPassword.Decrypt(),
            };

            this.originName = originID.HasValue ? originID.Value.ToString() : "-- null --";

            m_oSpLoad = new UserDataForLogin(DB, Log)
            {
                Email    = sEmail,
                OriginID = originID.HasValue ? (int)originID.Value : (int?)null,
            };

            m_oSpResult = new UserLoginCheckResult(DB, Log)
            {
                Ip            = sRemoteIp,
                LotteryCode   = promotionName,
                PageVisitTime = promotionPageVisitTime,
            };
        }         // constructor
Ejemplo n.º 3
0
        public SetCustomerPasswordByToken(
            Guid token,
            CustomerOriginEnum origin,
            DasKennwort password,
            DasKennwort passwordAgain,
            bool isBrokerLead,
            string remoteIP
            )
        {
            UserID    = 0;
            IsBroker  = false;
            SessionID = 0;
            ErrorMsg  = null;

            this.origin        = origin;
            this.passwordAgain = passwordAgain.Decrypt();

            this.spDetails = new LoadUserDetailsByRestoreToken(DB, Log)
            {
                Token        = token,
                IsBrokerLead = isBrokerLead,
            };

            this.securityData = new UserSecurityData(this)
            {
                NewPassword = password.Decrypt(),
            };

            this.spSetNewPassword = new SpSetCustomerPasswordByToken(DB, Log)
            {
                Token        = token,
                IsBrokerLead = isBrokerLead,
                RemoteIP     = remoteIP,
            };
        }         // constructor
Ejemplo n.º 4
0
        public BrokerUpdatePassword(
            string sContactEmail,
            CustomerOriginEnum origin,
            DasKennwort oldPassword,
            DasKennwort newPassword,
            DasKennwort newPasswordAgain
            )
        {
            this.spLoad = new BrokerLoadDetailsForPasswordUpdate(DB, Log)
            {
                ContactEmail = sContactEmail,
                OriginID     = (int)origin,
            };

            this.oldPassword      = oldPassword.Decrypt();
            this.newPassword      = newPassword.Decrypt();
            this.newPasswordAgain = newPasswordAgain.Decrypt();
        }         // constructor
Ejemplo n.º 5
0
        public BrokerSignup(
            string sFirmName,
            string sFirmRegNum,
            string sContactName,
            string sContactEmail,
            string sContactMobile,
            string sMobileCode,
            string sContactOtherPhone,
            DasKennwort password,
            DasKennwort passwordAgain,
            string sFirmWebSiteUrl,
            bool bIsCaptchaEnabled,
            int nBrokerTermsID,
            string sReferredBy,
            bool bFCARegistered,
            string sLicenseNumber,
            int uiOriginID
            )
        {
            this.isCaptchaEnabled = bIsCaptchaEnabled;
            this.mobileCode       = sMobileCode;

            this.sp = new SpBrokerSignUp(password.Decrypt(), passwordAgain.Decrypt(), DB, Log)
            {
                FirmName                         = sFirmName,
                FirmRegNum                       = sFirmRegNum,
                ContactName                      = sContactName,
                ContactEmail                     = (sContactEmail ?? string.Empty).Trim().ToLowerInvariant(),
                ContactMobile                    = sContactMobile,
                ContactOtherPhone                = sContactOtherPhone,
                EstimatedMonthlyClientAmount     = 0,
                FirmWebSiteUrl                   = sFirmWebSiteUrl,
                EstimatedMonthlyApplicationCount = 0,
                BrokerTermsID                    = nBrokerTermsID,
                ReferredBy                       = sReferredBy,
                Strategy                         = this,
                FCARegistered                    = bFCARegistered,
                LicenseNumber                    = sLicenseNumber,
                UiOriginID                       = uiOriginID,
            };

            Properties = new BrokerProperties();
        }         // constructor
        public SignupUnderwriterMultiOrigin(string sEmail, DasKennwort sPassword, string sRoleName)
        {
            string userName = NormalizeUserName(sEmail);

            this.securityData = new UserSecurityData(this)
            {
                Email       = userName,
                NewPassword = sPassword.Decrypt(),
            };

            var pu = new PasswordUtility(CurrentValues.Instance.PasswordHashCycleCount);

            var pass = pu.Generate(sEmail, this.securityData.NewPassword);

            this.sp = new CreateUserForUnderwriter(DB, Log)
            {
                UserName   = userName,
                EzPassword = pass.Password,
                Salt       = pass.Salt,
                CycleCount = pass.CycleCount,
                RoleName   = (sRoleName ?? string.Empty).Trim().ToLowerInvariant(),
            };
        }         // constructor
Ejemplo n.º 7
0
        public CustomerChangePassword(
            string email,
            CustomerOriginEnum?origin,
            DasKennwort oldPassword,
            DasKennwort newPassword
            )
        {
            ErrorMessage = null;

            this.securityData = new UserSecurityData(this)
            {
                Email       = email,
                OldPassword = oldPassword.Decrypt(),
                NewPassword = newPassword.Decrypt(),
            };

            this.spLoad = new UserDataForLogin(DB, Log)
            {
                Email    = email,
                OriginID = origin == null ? (int?)null : (int)origin.Value
            };

            this.spResult = new SpUserChangePassword(DB, Log);
        }         // constructor
Ejemplo n.º 8
0
        public BrokerLogin(
            string sEmail,
            DasKennwort sPassword,
            string promotionName,
            DateTime?promotionPageVisitTime,
            int uiOriginID
            )
        {
            this.spLoadDataForLoginCheck = new BrokerLoadLoginData(DB, Log)
            {
                Email      = sEmail,
                UiOriginID = uiOriginID,
            };

            this.spOnSuccess = new BrokerLoginSucceeded(DB, Log)
            {
                LotteryCode   = promotionName,
                PageVisitTime = promotionPageVisitTime,
            };

            this.password = sPassword.Decrypt();

            Properties = new BrokerProperties();
        }         // constructor
Ejemplo n.º 9
0
 public PasswordChanged(int customerId, DasKennwort oPassword) : base(customerId, true)
 {
     this.rawPassword = oPassword.Decrypt();
 }         // constructor