/// <summary> /// UserChangePasswordAsync changes the password of a specified user in async /// </summary> /// <param name="request"></param> /// <returns></returns> public async Task <AuthUserChangePasswordResponse> UserChangePasswordAsync(AuthUserChangePasswordRequest request, Metadata headers = null) { AuthUserChangePasswordResponse response = new AuthUserChangePasswordResponse(); bool success = false; int retryCount = 0; while (!success) { try { response = await _balancer.GetConnection().authClient.UserChangePasswordAsync(request, headers); success = true; } catch (RpcException ex) when(ex.StatusCode == StatusCode.Unavailable) { retryCount++; if (retryCount >= _balancer._numNodes) { throw ex; } } } return(response); }
/// <summary> /// UserChangePasswordAsync changes the password of a specified user in async /// </summary> /// <param name="request"></param> /// <returns></returns> public async Task <AuthUserChangePasswordResponse> UserChangePasswordAsync(AuthUserChangePasswordRequest request, Metadata headers = null) { AuthUserChangePasswordResponse response = new AuthUserChangePasswordResponse(); response = await _balancer.GetConnection().authClient.UserChangePasswordAsync(request, headers); return(response); }
/// <summary> /// UserChangePassword changes the password of a specified user /// </summary> /// <param name="request"></param> /// <returns></returns> public AuthUserChangePasswordResponse UserChangePassword(AuthUserChangePasswordRequest request, Metadata headers = null) { AuthUserChangePasswordResponse response = new AuthUserChangePasswordResponse(); response = _balancer.GetConnection().authClient.UserChangePassword(request, headers); return(response); }
public AuthUserChangePasswordResponse UserChangePassword(ByteSequence user, ByteSequence password) { Etcdserverpb.AuthUserChangePasswordRequest changePasswordRequest = new Etcdserverpb.AuthUserChangePasswordRequest(); changePasswordRequest.Name = user.ToString(); changePasswordRequest.Password = password.ToString(); var rsp = authClient.UserChangePassword(changePasswordRequest); AuthUserChangePasswordResponse response = new AuthUserChangePasswordResponse(rsp); return(response); //return Util.ToCompletableFuture( // this.stub.userChangePassword(changePasswordRequest), // new FunctionResponse<Etcdserverpb.AuthUserChangePasswordRequest, AuthUserChangePasswordResponse>()); }
/// <summary> /// UserChangePasswordAsync changes the password of a specified user in async /// </summary> /// <param name="request"></param> /// <returns></returns> public async Task <AuthUserChangePasswordResponse> UserChangePasswordAsync(AuthUserChangePasswordRequest request) { AuthUserChangePasswordResponse response = new AuthUserChangePasswordResponse(); try { response = await _authClient.UserChangePasswordAsync(request, _headers); } catch (RpcException ex) { ResetConnection(ex); throw; } catch { throw; } return(response); }
/// <summary> /// UserChangePassword changes the password of a specified user /// </summary> /// <param name="request"></param> /// <returns></returns> public AuthUserChangePasswordResponse UserChangePassword(AuthUserChangePasswordRequest request) { AuthUserChangePasswordResponse response = new AuthUserChangePasswordResponse(); try { response = _authClient.UserChangePassword(request, _headers); } catch (RpcException ex) { ResetConnection(ex); throw; } catch { throw; } return(response); }