예제 #1
0
        public Task <IdentityResult> ChangeUserPasswordAsync(User entity,
                                                             string oldPassword, string newPassword)
        {
            entity.CheckArgumentIsNull(nameof(entity));

            return(_userManager.ChangePasswordAsync(entity, oldPassword, newPassword));
        }
예제 #2
0
        public async Task <IdentityResult> UpdateUserAsync(User entity, string password)
        {
            entity.CheckArgumentIsNull(nameof(entity));

            if (!String.IsNullOrEmpty(password))
            {
                await RemoveUserPasswordAsync(entity);

                await SetUserPasswordAsync(entity, password);
            }

            return(await UpdateUserInfoAsync(entity));
        }
예제 #3
0
        public Task <IdentityResult> RemoveUserPasswordAsync(User entity)
        {
            entity.CheckArgumentIsNull(nameof(entity));

            return(_userManager.RemovePasswordAsync(entity));
        }
예제 #4
0
        public Task <IdentityResult> SetUserPasswordAsync(User entity, string password)
        {
            entity.CheckArgumentIsNull(nameof(entity));

            return(_userManager.AddPasswordAsync(entity, password));
        }
예제 #5
0
        public Task <IdentityResult> UpdateUserInfoAsync(User entity)
        {
            entity.CheckArgumentIsNull(nameof(entity));

            return(_userManager.UpdateAsync(entity));
        }
예제 #6
0
        public Task <IdentityResult> DeleteUserAsync(User entity)
        {
            entity.CheckArgumentIsNull(nameof(entity));

            return(_userManager.DeleteAsync(entity));
        }
예제 #7
0
        public Task <IdentityResult> CreateUserAsync(User entity, string password)
        {
            entity.CheckArgumentIsNull(nameof(entity));

            return(_userManager.CreateAsync(entity, password));
        }