Added getpass

This commit is contained in:
Ben D
2022-02-01 02:26:38 -08:00
parent 8427a64c60
commit 460c7d45d1

View File

@@ -10,6 +10,7 @@ import requests
import json
import sys
import os
from getpass import getpass
try:
from loguru import logger
@@ -1218,9 +1219,9 @@ def prompt_credentials(config):
print(f"{Colors.LIGHT_GREEN}DO NOT SHARE YOUR CREDENTIALS WITH ANYONE.{Colors.END}")
config["username"] = input("Enter your api.switchvoxuc.com username: ")
config["password"] = input("Enter your api.switchvoxuc.com password: ")
config["password"] = getpass("Enter your api.switchvoxuc.com password: ")
config["provider_username"] = input("Enter your api.nwsip.com username: ")
config["provider_password"] = input("Enter your api.nwsip.com password: ")
config["provider_password"] = getpass("Enter your api.nwsip.com password: ")
print(f"{Colors.LIGHT_GREEN}Configure additoinal tenant credentials.{Colors.END}")
tenant = input("Enter your tenant name or enter for None: ") or None
@@ -1230,13 +1231,13 @@ def prompt_credentials(config):
config["tenant"][tenant]["username"] = input(
f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.switchvoxuc.com username: "
)
config["tenant"][tenant]["password"] = input(
config["tenant"][tenant]["password"] = getpass(
f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.switchvoxuc.com password: "
)
config["tenant"][tenant]["provider_username"] = input(
f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.nwsip.com username: "
)
config["tenant"][tenant]["provider_password"] = input(
config["tenant"][tenant]["provider_password"] = getpass(
f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.nwsip.com password: "
)