[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: equip CLI with password change
From: |
gnunet |
Subject: |
[libeufin] branch master updated: equip CLI with password change |
Date: |
Tue, 26 Jan 2021 15:38:44 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new b3e1134 equip CLI with password change
b3e1134 is described below
commit b3e1134bff120be95066f019e9feb4f9704e8e0d
Author: MS <ms@taler.net>
AuthorDate: Tue Jan 26 15:38:40 2021 +0100
equip CLI with password change
---
cli/bin/libeufin-cli | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli
index c7aabe5..7ae7237 100755
--- a/cli/bin/libeufin-cli
+++ b/cli/bin/libeufin-cli
@@ -86,6 +86,33 @@ def list_users(obj):
print(resp.content.decode("utf-8"))
+@users.command(help="Change user's password")
+@click.argument("username")
+@click.option(
+ "--new-password",
+ help="New password",
+ prompt=True,
+ hide_input=True,
+ confirmation_prompt=True,
+)
+@click.pass_obj
+def change_password(obj, username, new_password):
+ url = urljoin(obj.nexus_base_url, f"/users/password")
+ try:
+ body = dict(newPassword=new_password)
+ resp = post(
+ url,
+ json=body,
+ auth=auth.HTTPBasicAuth(obj.nexus_username, obj.nexus_password),
+ )
+ except Exception as e:
+ print(e)
+ print("Could not reach nexus at " + url)
+ exit(1)
+
+ tell_user(resp)
+
+
@users.command("create", help="Create a new user")
@click.argument("username")
@click.option(
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: equip CLI with password change,
gnunet <=