Exemplo n.º 1
0
        public async Task <ActionResult> ForgottenCredentials(string clientId, string returnUrl)
        {
            if (string.IsNullOrEmpty(clientId))
            {
                clientId = _owinWrapper.GetIdsClientId();
            }
            var model = await _accountOrchestrator.StartForgottenPassword(clientId, returnUrl);

            if (!model.Valid)
            {
                return(new HttpStatusCodeResult((int)HttpStatusCode.BadRequest));
            }

            _owinWrapper.RemovePartialLoginCookie();
            _owinWrapper.SignoutUser();

            return(View("ForgottenCredentials", model));
        }