Esempio n. 1
0
        public static void SendApprovalRejectionMail2(decimal authId, string eventType, string recordStatus,
                                                      string formName, string rejectionReason)
        {
            try
            {
                var _repo = new DapperGeneralSettings();
                var dg    = _repo.GetApprovers_Mail_Email(authId);
                if (dg.Count <= 0)
                {
                    return;
                }
                //List<EmailObj> dg = new List<EmailObj>();
                //dg.Add(new EmailObj()
                //{
                //    Email = makerEmail,
                //});
                string eventMsg = recordStatus == approve?string.Format("Record Approved Successfully") : "Record Rejected";

                var mail = NotificationSystem.SendEmail(new EmailMessage()
                {
                    EmailAddress = dg,

                    emailSubject = "Approval/Rejection Status.",

                    EmailContent  = new EmailerNotification().PopulateBody(dg[0].FULLNAME, "#", eventMsg, "", DateTime.Now),
                    EntryDate     = DateTime.Now,
                    HasAttachment = false
                });
            }
            catch
            {
            }
        }
Esempio n. 2
0
        public static void SendMerchantUploadApprovalRejectionMail(string makerId, string eventType, string recordStatus,
                                                                   string formName, string rejectionReason, string batchId, string instInputerFullName, List <EmailObj> instEmail, int?InitiatorInstitutionId)
        {
            try
            {
                var _repo = new DapperGeneralSettings();
                var lst   = new List <EmailObj>();
                var dg    = _repo.GetGroupEmail(1, false, false).FirstOrDefault();
                if (dg != null)
                {
                    var gt = SplitGroupEmail(dg.EMAIL);
                    if (gt.Count != 0)
                    {
                        lst.AddRange(gt);
                    }
                }
                if (instEmail != null && instEmail.Count != 0)
                {
                    lst.AddRange(instEmail); //_repo.GetBusinessTeamEmail(makerId);
                }
                if (lst.Count <= 0)
                {
                    return;
                }
                // get institutionName
                var instName = "";
                if (InitiatorInstitutionId != null && InitiatorInstitutionId != 0)
                {
                    var rr = _repo.GetInstitutionName(InitiatorInstitutionId.GetValueOrDefault());
                    if (rr != null)
                    {
                        instName = rr.INSTITUTION_NAME;
                    }
                }
                var    inputName = instName; //= ""; // string.Concat(instName,"|", instInputerFullName ?? "");
                string eventMsg  = recordStatus == approve?string.Format("Approval of #{0} Merchant registeration ", batchId) : string.Format("Decline of #{0} Merchant registeration", batchId);

                var mail = NotificationSystem.SendEmail(new EmailMessage()
                {
                    EmailAddress = lst,

                    emailSubject = eventMsg,

                    EmailContent  = new EmailerNotification().PopulateMerchantBody(batchId, inputName, eventType, rejectionReason, DateTime.Now),
                    EntryDate     = DateTime.Now,
                    HasAttachment = false
                });
            }
            catch
            {
            }
        }
Esempio n. 3
0
        public static void SendToApprover(string fullName, string eventMsg, string approverId)
        {
            try
            {
                IDapperGeneralSettings _repo = new DapperGeneralSettings();
                var dg = _repo.GetApproverIdEmail(approverId);

                if (dg.Count > 0)
                {
                    var mail = NotificationSystem.SendEmail(new EmailMessage()
                    {
                        EmailAddress  = dg,
                        emailSubject  = "Authorization required.",
                        EmailContent  = new EmailerNotification().PopulateBody(fullName, "#", eventMsg, "", DateTime.Now),
                        EntryDate     = DateTime.Now,
                        HasAttachment = false
                    });
                }
            }
            catch (Exception ex)
            {
            }
        }
Esempio n. 4
0
        public static void SendForAuthorization(int menuid, string fullName, string deptCode, int userinstitutionItbid, string eventMsg)
        {
            try
            {
                IDapperGeneralSettings _repo = new DapperGeneralSettings();
                var dg = _repo.GetAuthorizeEmailList(menuid, deptCode, userinstitutionItbid);

                if (dg.Count > 0)
                {
                    var mail = NotificationSystem.SendEmail(new EmailMessage()
                    {
                        EmailAddress  = dg,
                        emailSubject  = "Authorization required.",
                        EmailContent  = new EmailerNotification().PopulateBody(fullName, "#", eventMsg, "", DateTime.Now),
                        EntryDate     = DateTime.Now,
                        HasAttachment = false
                    });
                }
            }
            catch (Exception ex)
            {
            }
        }
        static void Main(string[] args)

        {
            //
            //string gh = "user id=DPPADMIN; password=DPPADMIN; Connection Timeout=600; Max Pool Size=150; data source= (DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 172.19.4.90)(PORT = 1700)) (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = TWODB))))";
            //string conString = "Data Source=172.19.4.103:1700/TWODB;User Id=DPPADMIN;password=DPPADMIN;";
            //string twoConString = !string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["TwoConfig"]) ? Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["TwoConfig"]) : string.Empty;
            //string MEBSource = !string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["MEBSource"]) ? Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["MEBSource"]) : string.Empty;
            //string MEBTarget = !string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["MEBTarget"]) ? Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["MEBTarget"]) : string.Empty;
            string reportPath            = !string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["ReportPath"]) ? Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["ReportPath"]) : string.Empty;
            string logopath              = !string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["LogoPath"]) ? Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["LogoPath"]) : string.Empty;
            IDapperGeneralSettings _repo = new DapperGeneralSettings();

            // string conString = twoConString;
            // var dd =  new SettlementProcess().GetMSC_PERC("1654487896", "1199803451", "2044QF28", "2044OG00V000183", "VISA", "566", "8220", 20916, "566", "0", "0",0,0,0,0, "0");

            // int rec1 = _repo.PostMEB(MEBSource, MEBTarget, reportPath, logopath, "9622331", null);


            // DateTime? v_SETTDATE = null;

            //new SettlementProcess().SETTProcess("9622331");

            //(SETTDATE, reportPATH, lgopath,  NULL);
            IMainReport _repoSETT = new MainReport();

            ////string sett = _repoSETT.RPT_GenSettlementFile(DateTime.Parse("02-FEB-17"), reportPath, logopath, null);

            //var g = new EmailProcess();
            // g.SendMerchantarteeSettlementEmail("26-May-2017", "");
            // IMainReport _repoSETT = new MainReport();
            // g.SendMerchantVIPSettlementEmail("29-JUN-2017", "");
            //    string sett2 = _repoSETT.RPT_GenVIPMerchant(new DateTime(2017,09,06), reportPath, logopath, null);

            //new SettlementProcess_MEB().SETTProcess("9622331", "08-FEB-17");


            //string dtFrom2 = DateTime.Today.ToString("dd-MMM-yyyy");
            //new MEBCollectionClass().MEBProcess(dtFrom2);

            ////v_SETTDATE = DateTime.Today;
            ////v_SETTDATE.Value.Date.ToString("dd-MMM-yy");
            //IDapperSettlementReport _repoSETT = new DapperSettlementReport();
            // bool sett = _repoSETT.GenSettlementFileSETT(DateTime.Parse(v_SETTDATE.Value.Date.ToString("dd-MMM-yy")), null, reportPath, logopath, null);
            // bool sett = _repoSETT.GenSettlementFileSETT(DateTime.Parse("16-JAN-17"), null, reportPath, logopath, null);


            //   int rec2 = _repo.processSettlement(MEBTarget, reportPath, logopath, null);

            //P.SendSettlementInstitutionNotification("12-MAY-2017", "");

            //var cbn_code = "011";
            //var prefixM = string.Concat("2", cbn_code, "LA"); ;
            //var lastMidGen = "";
            //var recM = _repo.GetLastMidTidGenerated(prefixM, cbn_code, "M");
            //if(recM != null)
            //{
            //    lastMidGen = recM.MERCHANTID;
            //}
            //var mid = MidTidGenerator.GenMid(prefixM, "2011LAAAAAAAAA9");
            //Console.WriteLine("Start processing..........");
            //LogFunction lgfn = new LogFunction();
            //lgfn.loginfo("", null, DateTime.Now.ToString());
            ////var D = new EmailProcess();
            ////D.SendMerchantarteeSettlementEmail("24-MAY-2017", "");
            //var output = @"C:\POS_AUTOMATION\SETTLEMENT_DETAIL_SETT_28-Jul-2017\ACCESS BANK NIGERIA PLC\ACQUIRER\NAIRA SETTLEMENT\ACCESS BANK NIGERIA PLC_ACQUIRER.xlsx";
            //var ext = Path.GetExtension(output);
            //var fileNameNew = string.Concat(Path.GetFileNameWithoutExtension(output), "_", DateTime.Now.ToString("dd-MM-yyyy"), Path.GetExtension(output));
            //var dest = @"C:\FTP_Path\UBA";
            //if (File.Exists(output) && Directory.Exists(dest))
            //{
            //    LogFunction2.WriteMaintenaceLogToFile("Directory exist for both source and destination path");
            //    // copy file to ftp path
            //    File.Copy(output, Path.Combine(dest, fileNameNew));
            //    LogFunction2.WriteMaintenaceLogToFile("File Copied Successfully");
            //}
            Console.WriteLine("enter a report type..........");
            Console.WriteLine("1.  SETTLEMENT MASTER REPORTS");
            Console.WriteLine("2.  NIBSS SETTLEMENT REPORTS");
            Console.WriteLine("3.  ACQUIRERE/ISSUER/MDB REPORTS");
            Console.WriteLine("4.  MERCHANT REPORTS");
            Console.WriteLine("5.  PTSP/PTSA/TERW/SWTH REPORTS");
            Console.WriteLine("6.  ARTEE MERCHANT REPORTS");
            Console.WriteLine("7.  VIP MERCHANT REPORT");
            Console.WriteLine("8.  COLLECTION REPORT");
            Console.WriteLine("9.  UPHSS REPORT");
            Console.WriteLine("10. UPHSS REPORT CONSOLIDATED");
            string opt = Console.ReadLine();

            //GenHSSReportConsolidated
            Console.WriteLine("Select Date type..........");
            Console.WriteLine("1.  By Single Day");
            Console.WriteLine("2.  By Date Range");
            string optdatetype = Console.ReadLine();
            int    noofdays    = 0;
            string dtFrom      = "";

            if (optdatetype == "2")
            {
                Console.WriteLine("enter a report Start date..........");
                string fromdt = Console.ReadLine();
                Console.WriteLine("enter a report End date..........");
                string todt = Console.ReadLine();
                dtFrom   = fromdt;
                noofdays = (Convert.ToDateTime(todt) - Convert.ToDateTime(fromdt)).Days;
                Console.WriteLine("Starting From" + dtFrom);
                for (int i = 0; i < noofdays; i++)
                {
                    DateTime dtFromDate = Convert.ToDateTime(dtFrom);


                    ////IDapperSettlementReport _repoSETT = new DapperSettlementReport();
                    ////bool sett = _repoSETT.GenSettlementFileSETT_EEPLUS(dtFromDate, null, reportPath, logopath, null);
                    //IMainReport _repoSETT = new MainReport();
                    // _repoSETT.TestExport();


                    if (opt == "1")
                    {
                        Console.WriteLine("processing........SETTLEMENT MASTER REPORT" + dtFrom);
                        string sett = _repoSETT.RPT_GenSettlementMASTER(DateTime.Parse(dtFrom), reportPath, logopath, null);
                    }
                    if (opt == "2")
                    {
                        Console.WriteLine("processing.........NIBSS Settlement Report" + dtFrom);
                        //string sett = _repoSETT.RPT_GenSettlementFile2(DateTime.Parse(dtFrom), reportPath, logopath, null);
                    }
                    if (opt == "3")
                    {
                        Console.WriteLine("processing.........ACQUIRER/ISSUER/MDB REPORT" + dtFrom);
                        //string sett = _repoSETT.RPT_GenSettlementFile(DateTime.Parse(dtFrom), reportPath, logopath, null);
                    }
                    if (opt == "4")
                    {
                        Console.WriteLine("processing..........Merchant Reports" + dtFrom);
                        //string sett = _repoSETT.RPT_GenMerchants(DateTime.Parse(dtFrom), reportPath, logopath, null);
                    }

                    if (opt == "6")
                    {
                        Console.WriteLine("processing..........ARTEE Merchant Reports" + dtFrom);
                        //string sett = _repoSETT.RPT_GenARTEEMerchant(DateTime.Parse(dtFrom), reportPath, logopath, null);
                        //var P = new EmailProcess();
                        //P.SendMerchantarteeSettlementEmail(dtFrom, "");
                    }
                    if (opt == "7")
                    {
                        Console.WriteLine("processing..........VIP Merchant Reports" + dtFrom);
                        // string sett = _repoSETT.RPT_GenVIPMerchant(DateTime.Parse(dtFrom), reportPath, logopath, null);
                        // var P = new EmailProcess();
                        //P.SendMerchantVIPSettlementEmail(dtFrom, "");
                    }
                    if (opt == "8")
                    {
                        Console.WriteLine("processing..........Collection Merchant Reports" + dtFrom);
                        // string sett = _repoSETT.RPT_CollectionGenMerchants(DateTime.Parse(dtFrom), reportPath, logopath, null);
                        // var P = new EmailProcess();
                        //  P.SendMerchantVIPSettlementEmail(dtFrom, "");
                    }

                    ////if (opt == "5")
                    ////{
                    ////    Console.WriteLine("processing..........Merchant Report By Merchant Deposit Bank" + dtFrom);

                    ////    string sett = _repoSETT.RPT_GenMDBMerchants(DateTime.Parse(dtFrom), reportPath, logopath, null);
                    ////}

                    if (opt == "5")
                    {
                        Console.WriteLine("processing..........Party Report (PTSP/PTSA/TERW/SWTH)" + dtFrom);

                        //string sett = _repoSETT.RPT_Settlement(DateTime.Parse(dtFrom), reportPath, logopath, null);
                    }
                    Console.WriteLine("processing Completed For " + dtFrom);
                    dtFrom = Convert.ToDateTime(dtFrom).AddDays(1).ToString();
                }
                Console.WriteLine("processing Completed");
            }
            else
            {
                Console.WriteLine("enter a report processing date..........");
                dtFrom = Console.ReadLine();
                Console.WriteLine(dtFrom);

                //DateTime dtFromDate =DateTime.Parse(dtFrom);
                //DateTime dtFromDate = DateTime.ParseExact(dtFrom, "dd/MM/yyyy", null);

                //Console.WriteLine("enter a report type..........");
                //Console.WriteLine("1.  SETTLEMENT MASTER REPORTS");
                //Console.WriteLine("2.  NIBSS SETTLEMENT REPORTS");
                //Console.WriteLine("3.  ACQUIRERE/ISSUER/MDB REPORTS");
                //Console.WriteLine("4.  MERCHANT REPORTS");
                //Console.WriteLine("5.  PTSP/PTSA/TERW/SWTH REPORTS");
                //Console.WriteLine("6.  ARTEE MERCHANT REPORTS");
                //Console.WriteLine("7.  VIP MERCHANT REPORT");
                //Console.WriteLine("8.  COLLECTION REPORT");

                //   opt = Console.ReadLine();
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB"); //dd/MM/yyyy



                if (opt == "1")
                {
                    Console.WriteLine("processing........SETTLEMENT MASTER REPORT" + dtFrom);
                    string sett = _repoSETT.RPT_GenSettlementMASTER(DateTime.Parse(dtFrom), reportPath, logopath, null);
                }
                if (opt == "2")
                {
                    //Console.WriteLine("processing.........NIBSS Settlement Report" + dtFrom);
                    string sett = _repoSETT.RPT_NIBSS(DateTime.Parse(dtFrom), reportPath, logopath, null);
                }
                if (opt == "3")
                {
                    Console.WriteLine("processing.........ACQUIRERE/ISSUER/MDB REPORT" + dtFrom);
                    string sett = _repoSETT.RPT_ACQUIREREISSMDB(DateTime.Parse(dtFrom), reportPath, logopath, null);
                }
                if (opt == "4")
                {
                    Console.WriteLine("processing..........Merchant Reports" + dtFrom);
                    // string sett = _repoSETT.RPT_GenMerchants(DateTime.Parse(dtFrom), reportPath, logopath, null);
                }

                if (opt == "6")
                {
                    Console.WriteLine("processing..........ARTEE Merchant Reports" + dtFrom);
                    //string sett = _repoSETT.RPT_GenARTEEMerchant(DateTime.Parse(dtFrom), reportPath, logopath, null);
                    //var P = new EmailProcess();
                    //P.SendMerchantarteeSettlementEmail(dtFrom, "");
                }
                if (opt == "7")
                {
                    Console.WriteLine("processing..........VIP Merchant Reports" + dtFrom);
                    //string sett = _repoSETT.RPT_GenVIPMerchant(DateTime.Parse(dtFrom), reportPath, logopath, null);
                    //var P = new EmailProcess();
                    //P.SendMerchantVIPSettlementEmail(dtFrom, "");
                }
                if (opt == "8")
                {
                    Console.WriteLine("processing..........Collection Merchant Reports" + dtFrom);
                    //string sett = _repoSETT.RPT_CollectionGenMerchants(DateTime.Parse(dtFrom), reportPath, logopath, null);
                    // var P = new EmailProcess();
                    //  P.SendMerchantVIPSettlementEmail(dtFrom, "");
                }

                ////if (opt == "5")
                ////{
                ////    Console.WriteLine("processing..........Merchant Report By Merchant Deposit Bank" + dtFrom);

                ////    string sett = _repoSETT.RPT_GenMDBMerchants(DateTime.Parse(dtFrom), reportPath, logopath, null);
                ////}

                if (opt == "5")
                {
                    Console.WriteLine("processing..........Party Report (PTSP/PTSA/TERW/SWTH)" + dtFrom);

                    //string sett = _repoSETT.RPT_Settlement(DateTime.Parse(dtFrom), reportPath, logopath, null);
                }

                if (opt == "9")
                {
                    //string[] sessions = { "2018021916" };
                    Console.WriteLine("Enter Session ID: ");
                    string sessionID = Console.ReadLine();
                    //foreach (string sessionID in sessions)
                    //{
                    Console.WriteLine("processing..........UPHSS REPORT " + dtFrom + " SESSION: " + sessionID);

                    //string sett = _repoSETT.RPT_GenHSSReport(DateTime.Parse(dtFrom), reportPath, logopath, null, sessionID);

                    // }
                }

                if (opt == "10")
                {
                    //string[] sessions = { "2018021916" };
                    //  Console.WriteLine("Enter Session ID: ");
                    // string sessionID = Console.ReadLine();
                    //foreach (string sessionID in sessions)
                    //{
                    Console.WriteLine("processing..........UPHSS REPORT cosolidated ");

                    //string sett = _repoSETT.GenHSSReportConsolidated(DateTime.Parse(dtFrom), reportPath, logopath, null);

                    // }
                }



                Console.WriteLine("processing Completed");
            }
        }
Esempio n. 6
0
        public static ApplicationUserManager Create(IdentityFactoryOptions <ApplicationUserManager> options, IOwinContext context)
        {
            int lockCount  = 4;
            int passLength = 8;

            try
            {
                IDapperGeneralSettings _repo = new DapperGeneralSettings();
                lockCount  = 4;
                passLength = 8;
                var ct = _repo.GetCompanyProfile(0, false);
                if (ct != null)
                {
                    lockCount  = ct.LOCKOUT_TRIAL_COUNT.GetValueOrDefault();
                    passLength = ct.PASSWORDLENGTH.GetValueOrDefault();
                    //enableLockOut = ct.ENABLE_USER_LOCKOUT ?? false;
                    //enableChecker = ct.ENABLE_MAKER_CHECKER ?? false;
                }
            }
            catch
            {
                lockCount  = 4;
                passLength = 8;
            }
            var manager = new ApplicationUserManager(new UserStore <ApplicationUser>(context.Get <ApplicationDbContext>()));

            // Configure validation logic for usernames
            manager.UserValidator = new UserValidator <ApplicationUser>(manager)
            {
                AllowOnlyAlphanumericUserNames = false,
                RequireUniqueEmail             = true
            };

            // Configure validation logic for passwords
            manager.PasswordValidator = new PasswordValidator
            {
                RequiredLength          = passLength,
                RequireNonLetterOrDigit = true,
                RequireDigit            = true,
                RequireLowercase        = true,
                RequireUppercase        = true,
            };

            // Configure user lockout defaults
            manager.UserLockoutEnabledByDefault          = true;
            manager.DefaultAccountLockoutTimeSpan        = TimeSpan.FromMinutes(365 * 200 * 200); // TimeSpan.FromMinutes(5);
            manager.MaxFailedAccessAttemptsBeforeLockout = lockCount;

            // Register two factor authentication providers. This application uses Phone and Emails as a step of receiving a code for verifying the user
            // You can write your own provider and plug it in here.
            manager.RegisterTwoFactorProvider("Phone Code", new PhoneNumberTokenProvider <ApplicationUser>
            {
                MessageFormat = "Your security code is {0}"
            });
            manager.RegisterTwoFactorProvider("Email Code", new EmailTokenProvider <ApplicationUser>
            {
                Subject    = "Security Code",
                BodyFormat = "Your security code is {0}"
            });
            manager.EmailService = new EmailService();
            manager.SmsService   = new SmsService();
            var dataProtectionProvider = options.DataProtectionProvider;

            if (dataProtectionProvider != null)
            {
                manager.UserTokenProvider =
                    new DataProtectorTokenProvider <ApplicationUser>(dataProtectionProvider.Create("ASP.NET Identity"));
            }
            return(manager);
        }
Esempio n. 7
0
        // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
        public void ConfigureAuth(IAppBuilder app)
        {
            int idleTime = 5;

            try
            {
                IDapperGeneralSettings _repo = new DapperGeneralSettings();

                var ct = _repo.GetCompanyProfile(0);
                if (ct != null)
                {
                    idleTime = ct.SYSTEM_IDLE_TIMEOUT.GetValueOrDefault();
                }
            }
            catch
            {
                idleTime = 5;
            }
            // Configure the db context, user manager and signin manager to use a single instance per request
            app.CreatePerOwinContext(ApplicationDbContext.Create);
            app.CreatePerOwinContext <ApplicationUserManager>(ApplicationUserManager.Create);
            app.CreatePerOwinContext <ApplicationSignInManager>(ApplicationSignInManager.Create);

            // Enable the application to use a cookie to store information for the signed in user
            // and to use a cookie to temporarily store information about a user logging in with a third party login provider
            // Configure the sign in cookie
            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath          = new PathString("/Account/Login"),
                //ExpireTimeSpan = TimeSpan.FromMinutes(idleTime),
                SlidingExpiration = true,
                Provider          = new CookieAuthenticationProvider
                {
                    // Enables the application to validate the security stamp when the user logs in.
                    // This is a security feature which is used when you change a password or add an external login to your account.
                    OnValidateIdentity = SecurityStampValidator.OnValidateIdentity <ApplicationUserManager, ApplicationUser>(
                        validateInterval: TimeSpan.FromMinutes(idleTime),
                        regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager)),
                    OnResponseSignIn = signInContext =>
                    {
                        var expireTimeSpan = TimeSpan.FromMinutes(idleTime);

                        //if (signInContext.Properties.Dictionary["organization"] == "org-1")
                        //{
                        //    expireTimeSpan = TimeSpan.FromMinutes(45);
                        //}

                        signInContext.Properties.ExpiresUtc = DateTime.UtcNow.Add(expireTimeSpan);
                    }
                }
            });
            app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);

            // Enables the application to temporarily store user information when they are verifying the second factor in the two-factor authentication process.
            app.UseTwoFactorSignInCookie(DefaultAuthenticationTypes.TwoFactorCookie, TimeSpan.FromMinutes(5));

            // Enables the application to remember the second login verification factor such as phone or email.
            // Once you check this option, your second step of verification during the login process will be remembered on the device where you logged in from.
            // This is similar to the RememberMe option when you log in.
            app.UseTwoFactorRememberBrowserCookie(DefaultAuthenticationTypes.TwoFactorRememberBrowserCookie);

            // Uncomment the following lines to enable logging in with third party login providers
            //app.UseMicrosoftAccountAuthentication(
            //    clientId: "",
            //    clientSecret: "");

            //app.UseTwitterAuthentication(
            //   consumerKey: "",
            //   consumerSecret: "");

            //app.UseFacebookAuthentication(
            //   appId: "",
            //   appSecret: "");

            //app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
            //{
            //    ClientId = "",
            //    ClientSecret = ""
            //});
        }