]> git.sesse.net Git - letsencrypt-varnish-plugin/blobdiff - varnish.py
Translate to python3
[letsencrypt-varnish-plugin] / varnish.py
index 87abf22f9bd75c568f9e7ae7f82116cb3d0b69b3..1f6a05c093bbbfa8336e2df2c28a9cbed862c877 100644 (file)
@@ -6,6 +6,7 @@ import subprocess
 
 import zope.component
 import zope.interface
+from zope.interface import implementer, provider
 
 from acme import challenges
 
@@ -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"