Esempio n. 1
0
        public ActionResult Login(string id, string clientId)
        {
            var signinMessage = _owinWrapper.GetSignInMessage(id);
            var returnUrl     = "";

            if (signinMessage != null)
            {
                returnUrl = signinMessage.ReturnUrl;
            }

            if (string.IsNullOrEmpty(clientId))
            {
                clientId  = _owinWrapper.GetIdsClientId();
                returnUrl = _owinWrapper.GetIdsReturnUrl();
            }

            _owinWrapper.SetIdsContext(returnUrl, clientId);

            var model = new OrchestratorResponse <LoginViewModel>
            {
                Data = new LoginViewModel
                {
                    ReturnUrl = returnUrl,
                    ClientId  = clientId
                }
            };

            if (TempData["AccountUnlocked"] != null)
            {
                model.FlashMessage = new FlashMessageViewModel()
                {
                    Severity   = FlashMessageSeverityLevel.Success,
                    Headline   = "Account Unlocked",
                    SubMessage =
                        "Your account has been unlocked, if you can't remember your password use the Forgotten Password link below"
                };
            }
            return(View(model));
        }
Esempio n. 2
0
        public ActionResult Index()
        {
            var returnUrl = _owinWrapper.GetIdsReturnUrl();

            if (!string.IsNullOrEmpty(returnUrl))
            {
                Logger.Info($"HomeController:Index - Redirecting user out of iDams to {returnUrl}");
                return(View(new HomePageViewModel {
                    ReturnUrl = returnUrl
                }));
            }

            returnUrl = _identityServerConfiguration.EmployerPortalUrl;
            Logger.Info($"HomeController:Index - Redirecting user out of iDams (brute force) to {returnUrl}");
            return(View(new HomePageViewModel {
                ReturnUrl = _identityServerConfiguration.EmployerPortalUrl
            }));
        }