public async Task ChangePasswordAsync(string loginName, string currentPassword, string newPassword,
                                              UserCredentials?userCredentials = null, CancellationToken cancellationToken = default)
        {
            if (loginName == null)
            {
                throw new ArgumentNullException(nameof(loginName));
            }
            if (currentPassword == null)
            {
                throw new ArgumentNullException(nameof(currentPassword));
            }
            if (newPassword == null)
            {
                throw new ArgumentNullException(nameof(newPassword));
            }
            if (loginName == string.Empty)
            {
                throw new ArgumentOutOfRangeException(nameof(loginName));
            }
            if (currentPassword == string.Empty)
            {
                throw new ArgumentOutOfRangeException(nameof(currentPassword));
            }
            if (newPassword == string.Empty)
            {
                throw new ArgumentOutOfRangeException(nameof(newPassword));
            }

            await _client.ChangePasswordAsync(new ChangePasswordReq {
                Options = new ChangePasswordReq.Types.Options {
                    CurrentPassword = currentPassword,
                    NewPassword     = newPassword,
                    LoginName       = loginName
                }
            }, EventStoreCallOptions.Create(Settings, Settings.OperationOptions, userCredentials, cancellationToken));
        }
        public async Task ChangePasswordAsync(string loginName, string currentPassword, string newPassword,
                                              UserCredentials?userCredentials = null, CancellationToken cancellationToken = default)
        {
            if (loginName == null)
            {
                throw new ArgumentNullException(nameof(loginName));
            }
            if (currentPassword == null)
            {
                throw new ArgumentNullException(nameof(currentPassword));
            }
            if (newPassword == null)
            {
                throw new ArgumentNullException(nameof(newPassword));
            }
            if (loginName == string.Empty)
            {
                throw new ArgumentOutOfRangeException(nameof(loginName));
            }
            if (currentPassword == string.Empty)
            {
                throw new ArgumentOutOfRangeException(nameof(currentPassword));
            }
            if (newPassword == string.Empty)
            {
                throw new ArgumentOutOfRangeException(nameof(newPassword));
            }

            await _client.ChangePasswordAsync(new ChangePasswordReq {
                Options = new ChangePasswordReq.Types.Options {
                    CurrentPassword = currentPassword,
                    NewPassword     = newPassword,
                    LoginName       = loginName
                }
            }, RequestMetadata.Create(userCredentials ?? Settings.DefaultCredentials), cancellationToken : cancellationToken);
        }