A fork to adjust LDAP connectivity to our YOURLS instance
Go to file
davoaust f554c10762 Support group auth, privileged account & attribute filter
Added support for group auth, 2 new settings:
- LDAPAUTH_GROUP_ATTR
- LDAPAUTH_GROUP_REQ

If they're not set don't check group membership.

Added support for using a privileged account to do the user search. 2 new settings:
- LDAPAUTH_SEARCH_USER
- LDAPAUTH_SEARCH_PASS

Limited returned attributes to only the ones we need.
2015-05-18 15:15:33 +10:00
LICENSE Initial commit 2013-08-25 07:14:29 -07:00
plugin.php Support group auth, privileged account & attribute filter 2015-05-18 15:15:33 +10:00
README.md prefix 2013-08-25 20:00:04 +02:00

yourls-ldap-plugin

This plugin for YOURLS enables the simple use of LDAP for user authentication.

Installation

  1. Download the latest yourls-ldap-plugin.
  2. Copy the plugin folder into your user/plugins folder for YOURLS.
  3. Set up the parameters for yourls-ldap-plugin in YOURLS configuration user/config.php (see below).
  4. Activate the plugin with the plugin manager in the admin interface.

Usage

When yourls-cas-plugin is enabled and user was not successfuly authenticated using data specified in yourls_user_passwords, an LDAP authentication attempt will be made. If LDAP authentication is successful, then you will immediately go to the admin interface.

Configuration

  • define( 'LDAPAUTH_HOST', 'ldaps://ldap.domain.com' ) LDAP host name, IP or URL. You can use ldaps://host for LDAP with TLS
  • define( 'LDAPAUTH_PORT', '636' ) LDAP server port - often 389 or 636 for TLS (LDAPS)
  • define( 'LDAPAUTH_BASE', 'dc=domain,dc=com' ) Base DN (location of users)
  • define( 'LDAPAUTH_USERNAME_FIELD', 'uid') (optional) LDAP field name in which username is store

Troubleshooting

  • Check PHP error log usually at /var/log/php.log
  • Check your webserver logs
  • You can try modifying plugin code to print some more debug info

License

Copyright 2013 K3A
Copyright 2013 Nicholas Waller (code@nicwaller.com) as I used some parts of his CAS authentication plugin :)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.