diff --git a/.gitignore b/.gitignore index 688caab..b85749e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .venv corenetworks-credentials.ini .python-version -**.pyc \ No newline at end of file +**.pyc +certbot-test \ No newline at end of file diff --git a/certbot_dns_corenetworks/__init__.pyc b/certbot_dns_corenetworks/__init__.pyc deleted file mode 100644 index a9879d4..0000000 Binary files a/certbot_dns_corenetworks/__init__.pyc and /dev/null differ diff --git a/certbot_dns_corenetworks/dns_corenetworks.py b/certbot_dns_corenetworks/dns_corenetworks.py index 46f1993..58af110 100644 --- a/certbot_dns_corenetworks/dns_corenetworks.py +++ b/certbot_dns_corenetworks/dns_corenetworks.py @@ -62,7 +62,9 @@ class Authenticator(dns_common.DNSAuthenticator): def _get_corenetworks_client(self): return _CoreNetworksAPIClient( - self.credentials.conf("login"), self.credentials.conf("password"), self.ttl + self.credentials.conf("username"), + self.credentials.conf("password"), + self.ttl, ) @@ -71,8 +73,8 @@ class _CoreNetworksAPIClient: Encapsulates all communication with the Core Networks API. """ - def __init__(self, login, password, ttl): - self.login = login + def __init__(self, username, password, ttl): + self.username = username self.password = password self.ttl = ttl self.token = None @@ -83,9 +85,11 @@ class _CoreNetworksAPIClient: return self.token try: + print(self.username) + print(self.password) response = requests.post( f"{API_BASE_URL}/auth/token", - json={"login": self.login, "password": self.password}, + json={"login": self.username, "password": self.password}, timeout=30, ) response.raise_for_status() diff --git a/certbot_dns_corenetworks/dns_corenetworks.pyc b/certbot_dns_corenetworks/dns_corenetworks.pyc deleted file mode 100644 index cb89284..0000000 Binary files a/certbot_dns_corenetworks/dns_corenetworks.pyc and /dev/null differ