Commit 8ff6761b authored by Stanislav Bohm's avatar Stanislav Bohm
Browse files

ENH Taking password in more secure way

parent 3497d4b4
Pipeline #3592 failed with stage
in 3 minutes and 51 seconds
import sys
import requests
import getpass
def create_user(server, admin_token, username, password):
......@@ -32,16 +32,16 @@ def create_user(server, admin_token, username, password):
if __name__ == '__main__':
if len(sys.argv) < 5:
if len(sys.argv) < 4:
print('python <server-address> <admin-token> '
'<username> <password>')
server = sys.argv[1]
token = sys.argv[2]
username = sys.argv[3]
password = sys.argv[4]
password = getpass.getpass("Password for {}: ".format(username))
user = create_user(server, token, username, password)
print('User {} successfully created, id: {}'.format(username, user['_id']))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment