diff --git a/docs/ppolicy_api.rst b/docs/ppolicy_api.rst index a6d2364..cdd8f26 100644 --- a/docs/ppolicy_api.rst +++ b/docs/ppolicy_api.rst @@ -1,7 +1,34 @@ -Package ldapcherry.ppolicy -========================== +Implementing password policy modules +==================================== -.. automodule:: ldapcherry.ppolicy - :members: - :undoc-members: +API +--- + +The password policy modules must respect following API: + +.. autoclass:: ldapcherry.ppolicy.PPolicy + :members: check, info, __init__ + :undoc-members: check :show-inheritance: + +Configuration +------------- + +Parameters are declared in the main configuration file, inside the **ppolicy** section. + +After having set **self.config** to **config** in the constructor, parameters can be recovered +by **self.get_param**: + +.. autoclass:: ldapcherry.ppolicy.PPolicy + :members: get_param + :undoc-members: check + :show-inheritance: + +Example +------- + +Here is the simple default ppolicy module that comes with LdapCherry: + +.. literalinclude:: ../ldapcherry/ppolicy/simple.py + :language: python +