public ActionResult SignIn(string returnUrl, bool mobile = false)
        {
            // you can call AuthenticationHelper.GetRelyingPartyDetailsFromReturnUrl to get more information about the requested relying party
            var vm = new AtozViewModel
            {
                ReturnUrl = returnUrl,
                ShowClientCertificateLink = ConfigurationRepository.Global.EnableClientCertificateAuthentication,
                SiteTitle = ConfigurationRepository.LdapConfiguration.SiteTitle
            };

            if (mobile)
            {
                vm.IsSigninRequest = true;
            }
            return(View("AZ", vm));
        }
        public ActionResult SignIn(AtozViewModel model)
        {
            if (ModelState.IsValid)
            {
                if (new LdapManager(ConfigurationRepository.LdapConfiguration).Authenticate(model.Email, model.Password))
                {
                    // establishes a principal, set the session cookie and redirects
                    // you can also pass additional claims to signin, which will be embedded in the session token

                    return(ProcessSignIn(
                               model.Email,
                               AuthenticationMethods.Password,
                               model.ReturnUrl,
                               model.RememberMe,
                               ConfigurationRepository.Global.SsoCookieLifetime));
                }
            }

            ModelState.AddModelError("", @"Incorrect credential or not authorize");
            model.SiteTitle = ConfigurationRepository.LdapConfiguration.SiteTitle;
            model.ShowClientCertificateLink = ConfigurationRepository.Global.EnableClientCertificateAuthentication;
            return(View("AZ", model));
        }
        public ActionResult SignIn(AtozViewModel model)
        {
            if (ModelState.IsValid)
            {

                if (new LdapManager(ConfigurationRepository.LdapConfiguration).Authenticate(model.Email, model.Password))
                {
                    // establishes a principal, set the session cookie and redirects
                    // you can also pass additional claims to signin, which will be embedded in the session token

                    return ProcessSignIn(
                        model.Email,
                        AuthenticationMethods.Password,
                        model.ReturnUrl,
                        model.RememberMe,
                        ConfigurationRepository.Global.SsoCookieLifetime);
                }
            }

            ModelState.AddModelError("", @"Incorrect credential or not authorize");
            model.SiteTitle = ConfigurationRepository.LdapConfiguration.SiteTitle;
            model.ShowClientCertificateLink = ConfigurationRepository.Global.EnableClientCertificateAuthentication;
            return View("AZ",model);
        }
        public ActionResult SignIn(string returnUrl, bool mobile = false)
        {
            // you can call AuthenticationHelper.GetRelyingPartyDetailsFromReturnUrl to get more information about the requested relying party
            var vm = new AtozViewModel
            {
                ReturnUrl = returnUrl,
                ShowClientCertificateLink = ConfigurationRepository.Global.EnableClientCertificateAuthentication,
                SiteTitle = ConfigurationRepository.LdapConfiguration.SiteTitle
            };

            if (mobile) vm.IsSigninRequest = true;
            return View("AZ",vm);
        }