From: Stefan Schantl Date: Thu, 28 Aug 2014 20:11:52 +0000 (+0200) Subject: spdns.de: Add support for token based auth. X-Git-Tag: 005~21 X-Git-Url: http://git.ipfire.org/?p=ddns.git;a=commitdiff_plain;h=94ab4379efcc45a9e73c2c43701d662aafc7d99c spdns.de: Add support for token based auth. Fixes #10587. --- diff --git a/ddns.conf.sample b/ddns.conf.sample index 2a9642f..2ede3a4 100644 --- a/ddns.conf.sample +++ b/ddns.conf.sample @@ -113,6 +113,9 @@ # [test.spdns.org] # provider = spdns.org + +# Only use one the these two auth options. +# token = token # username = user # password = pass diff --git a/src/ddns/providers.py b/src/ddns/providers.py index 00a3855..2309257 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -986,6 +986,14 @@ class DDNSProviderSPDNS(DDNSProtocolDynDNS2, DDNSProvider): url = "https://update.spdns.de/nic/update" + @property + def username(self): + return self.get("username") or self.hostname + + @property + def password(self): + return self.get("username") or self.token + class DDNSProviderStrato(DDNSProtocolDynDNS2, DDNSProvider): handle = "strato.com"