Usage
Example Test Configuration¶
To test that the extension is working correctly without having to set up an LDAP service yourself, you can try this config snippet:
ckanext.ldap.uri = ldap://ldap.forumsys.com:389
ckanext.ldap.base_dn = dc=example,dc=com
ckanext.ldap.search.filter = cn=*{login}*
ckanext.ldap.username = cn
ckanext.ldap.auth.dn = cn=read-only-admin,dc=example,dc=com
ckanext.ldap.email = mail
ckanext.ldap.auth.password = password
ckanext.ldap.auth.method = SIMPLE
See here
for more information.
Then just login with tesla or gauss for example with password as the password.
Commands¶
ldap¶
setup-org: create the organisation specified inckanext.ldap.organization.id.ckan -c $CONFIG_FILE ldap setup-org
Templates¶
This extension overrides templates/user/login.html and sets the form action to the
LDAP login handler.
To use it elsewhere:
{% set ldap_action = h.get_login_action() %}
{% snippet "user/snippets/login_form.html", action=ldap_action, error_summary=error_summary %}
The helper function h.is_ldap_user() is also provided for templates.