Beispiel #1
0
    public async Task <IHttpActionResult> ChangePassword(string NewPassword, string OldPassword)
    {
        IdentityResult result = await service.ChangePassword(User.Identity.GetUserId(), OldPassword, NewPassword);

        if (!result.Succeeded)
        {
            return(GetErrorResult(result));
        }

        return(Ok());
    }