From 94ab4379efcc45a9e73c2c43701d662aafc7d99c Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Thu, 28 Aug 2014 22:11:52 +0200 Subject: [PATCH] spdns.de: Add support for token based auth. Fixes #10587. --- ddns.conf.sample | 3 +++ src/ddns/providers.py | 8 ++++++++ 2 files changed, 11 insertions(+) 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" -- 2.39.2