Beispiel #1
0
        public async Task <ActionResult> Index(string returnUrl)
        {
            return(await Task.Run <ActionResult>(() =>
            {
                if (User.Identity.IsAuthenticated)
                {
                    return RedirectToRoute(CandidateRouteNames.MyApplications);
                }

                _authenticationTicketService.Clear();

                if (returnUrl.IsValidReturnUrl())
                {
                    UserData.Push(UserDataItemNames.ReturnUrl, Server.UrlEncode(returnUrl));
                }

                return View();
            }));
        }
Beispiel #2
0
        public async Task <ActionResult> Index(string returnUrl)
        {
            return(await Task.Run <ActionResult>(() =>
            {
                if (User.Identity.IsAuthenticated)
                {
                    return RedirectToRoute(CandidateRouteNames.MyApplications);
                }

                _authenticationTicketService.Clear(HttpContext.Request.Cookies);

                if (!string.IsNullOrWhiteSpace(returnUrl))
                {
                    UserData.Push(UserDataItemNames.ReturnUrl, Server.UrlEncode(returnUrl));
                }

                return View();
            }));
        }