]> git.sesse.net Git - letsencrypt-varnish-plugin/blobdiff - varnish.py
Switch import calls to certbot
[letsencrypt-varnish-plugin] / varnish.py
index 87abf22f9bd75c568f9e7ae7f82116cb3d0b69b3..650bcbb8f71d4977b8afa7c7e25187de83c21ec9 100644 (file)
@@ -6,12 +6,13 @@ import subprocess
 
 import zope.component
 import zope.interface
+from zope.interface import implementer, provider
 
 from acme import challenges
 
-from letsencrypt import errors
-from letsencrypt import interfaces
-from letsencrypt.plugins import common
+from certbot import errors
+from certbot import interfaces
+from certbot.plugins import common
 
 
 logger = logging.getLogger(__name__)
@@ -23,9 +24,9 @@ def vcl_recv_line(achall):
 def vcl_synth_line(validation):
     return 'if (resp.status == 999) { set resp.status = 200; set resp.http.Content-Type = "text/plain"; synthetic("%s"); return (deliver); }  # Added by letsencrypt Varnish plugin for authentication\n' % (validation);
 
+@implementer(interfaces.IAuthenticator)
+@provider(interfaces.IPluginFactory)
 class Authenticator(common.Plugin):
-    zope.interface.implements(interfaces.IAuthenticator)
-    zope.interface.classProvides(interfaces.IPluginFactory)
     hidden = True
 
     description = "Manual configuration, authentication via Varnish VCL"