mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Improve example plugin
* Rename silly_auth_plugin to radic ale_silly_auth* Set package name * Add uninstall instructions
This commit is contained in:
parent
58c552bc5d
commit
13036c0eaa
1 changed files with 10 additions and 4 deletions
14
plugins.md
14
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue