From 13036c0eaad0ad628cd40501260b81ad72196f70 Mon Sep 17 00:00:00 2001 From: Unrud Date: Wed, 21 Jun 2017 11:51:12 +0200 Subject: [PATCH] Improve example plugin * Rename silly_auth_plugin to radic ale_silly_auth* Set package name * Add uninstall instructions --- plugins.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins.md b/plugins.md index e0d00de1..b3e9fbba 100644 --- a/plugins.md +++ b/plugins.md @@ -22,18 +22,19 @@ in an empty folder: from distutils.core import setup -setup(packages=["silly_auth_plugin"]) +setup(name="radicale_silly_auth", packages=["radicale_silly_auth"]) ``` -In the same folder create the sub-folder `silly_auth_plugin`. The folder +In the same folder create the sub-folder `radicale_silly_auth`. The folder must have the same name as specified in `packages` above. -Create the file `__init__.py` in the `silly_auth_plugin` folder with the +Create the file `__init__.py` in the `radicale_silly_auth` folder with the following content: ```python from radicale.auth import BaseAuth + class Auth(BaseAuth): def is_authenticated(self, user, password): self.logger.info("Login attempt by '%s' with password '%s'", @@ -48,7 +49,12 @@ python3 -m pip install --upgrade . ``` To make use this great creation in Radicale, set the configuration option -`type` in the `auth` section to `silly_auth_plugin`. +`type` in the `auth` section to `radicale_silly_auth`. + +You can uninstall the module with: +```shell +python3 -m pip uninstall radicale_silly_auth +``` ## Authentication plugins This plugin type is used to check login credentials.