]> git.ipfire.org Git - ddns.git/blobdiff - src/ddns/__init__.py
chore: add provider and sample configuration for infomaniak.ch
[ddns.git] / src / ddns / __init__.py
index 3e43fa7156d9366f7ed3096698b8a5f4331caaa2..ca232bf9ec4c571db60689b1b0cf74e00cf2f405 100644 (file)
@@ -86,6 +86,20 @@ class DDNSCore(object):
                """
                return sorted(self.providers.keys())
 
+       def get_provider_with_token_support(self):
+               """
+                       Returns a list with names of all registered providers
+                       which support token based authtentication.
+               """
+
+               token_provider = []
+
+               for handle, provider in sorted(self.providers.items()):
+                       if provider.supports_token_auth is True:
+                               token_provider.append(handle)
+
+               return sorted(token_provider)
+
        def load_configuration(self, filename):
                logger.debug(_("Loading configuration file %s") % filename)