mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 08:09:10 +02:00
Setuptools entry_points plugins
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
"""Example Let's Encrypt plugins."""
|
||||
import zope.interface
|
||||
|
||||
from letsencrypt.client import interfaces
|
||||
|
||||
|
||||
class Authenticator(object):
|
||||
zope.interface.implements(interfaces.IAuthenticator)
|
||||
|
||||
description = 'Example Authenticator plugin'
|
||||
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
|
||||
# Implement all methods from IAuthenticator, remembering to add
|
||||
# "self" as first argument, e.g. def prepare(self)...
|
||||
@@ -0,0 +1,16 @@
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
setup(
|
||||
name='letsencrypt-example-plugins',
|
||||
package='letsencrypt_example_plugins.py',
|
||||
install_requires=[
|
||||
'letsencrypt',
|
||||
'zope.interface',
|
||||
],
|
||||
entry_points={
|
||||
'letsencrypt.authenticators': [
|
||||
'example = letsencrypt_example_plugins:Authenticator',
|
||||
],
|
||||
},
|
||||
)
|
||||
Reference in New Issue
Block a user