예제 #1
0
        public ActionResult ChallengeEmail(string nonce)
        {
            string appKey = null;
            var    user   = _profileService.ValidateChallenge(nonce, out appKey);

            if (user != null)
            {
                _userEventHandler.ConfirmedEmail(user);
                ApplicationRecord app = _applicationsService.GetApplicationByKey(appKey);
                if (app == null)
                {
                    return(RedirectToAction("ChallengeEmailSuccess"));
                }
                else
                {
                    if (!_detectMobileService.isMobileBrowser(Request.UserAgent))
                    {
                        return(RedirectToAction("ChallengeEmailSuccess"));
                    }
                    else
                    {
                        string protocol = _applicationsService.GetApplicationProtocol(app.Id);
                        return(Redirect(protocol + "challengeemailsuccess?user="******"ChallengeEmailFail"));
        }
예제 #2
0
        public ActionResult ChallengeEmail(string nonce)
        {
            var user = _userService.ValidateChallenge(nonce);

            if (user != null)
            {
                _userEventHandler.ConfirmedEmail(user);

                return(RedirectToAction("ChallengeEmailSuccess"));
            }

            return(RedirectToAction("ChallengeEmailFail"));
        }
        protected JsonResult ChallengeEmailApiLogic(string nonce)
        {
            var      user = _userService.ValidateChallenge(nonce);
            Response result;

            if (user != null)
            {
                _userEventHandler.ConfirmedEmail(user);

                result = _utilsServices.GetResponse(ResponseType.Success, T("Email confirmed").Text);

                return(Json(result));
            }
            result = _utilsServices.GetResponse(ResponseType.None, T("Email not confirmed").Text);
            return(Json(result, JsonRequestBehavior.AllowGet));
        }