Esempio n. 1
0
        public async Task <IActionResult> ChangePasswordFromResetKeyAsync([FromBody] PassResetInput input)
        {
            //Note: basically this is a pass reset request, so NO need to inform a potential attacker about exceptions - always return ok!

            try
            {
                var resetPassSuccess =
                    await Auth.ChangePasswordFromResetKeyAsync(input.NewPass, input.VerificationKey);

                //Note: if handle to get here, then pass should be reset

                return(Ok(resetPassSuccess));
            }
            catch (Exception ex)
            {
                return(HandleException(ex));
            }
        }
Esempio n. 2
0
        public async Task <IHttpActionResult> ChangePasswordFromResetKey(PassResetInput input)
        {
            //Note: basically this is a pass reset request, so NO need to inform a potential attacker about exceptions - always return ok!

            try
            {
                var resetPassSuccess =
                    await Auth.ChangePasswordFromResetKeyAsync(CustomUserAccountService.GetInstance("MapHiveMbr"), input.NewPass, input.VerificationKey);

                //Note: if handle to get here, then pass should be reset

                return(Ok(resetPassSuccess));
            }
            catch (Exception ex)
            {
                return(HandleException(ex));
            }
        }