Skip to content

Change password

Change user's password.

change_password(stub, login_name, current_password, new_password, **kwargs)

Changes user's password.

Source code in src/eventstore_grpc/users/change_password.py
def change_password(
    stub: users_pb2_grpc.UsersStub,
    login_name: str,
    current_password: str,
    new_password: str,
    **kwargs,
) -> users_pb2.ChangePasswordResp:
    """Changes user's password."""
    request = users_pb2.ChangePasswordReq()
    options = users_pb2.ChangePasswordReq.Options()
    options.login_name = login_name
    options.current_password = current_password
    options.new_password = new_password
    request.options.CopyFrom(options)
    response = stub.ChangePassword(request, **kwargs)
    return response