Skip to content

archayl/ldap-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ldap-auth

Auth service provider package for Laravel 4

Installation

composer require archayl\ldap-auth
composer install

Configuration

Add this line to the end of service provider array

'Archayl\LdapAuth\LdapAuthServiceProvider',

Change app\config\auth.php driver to ldap

'driver' => 'ldap',

Create app\config\ldap.php with this content:

<?php

return array(
	'connection' => array(
		'host' => 'dc.example.com',                    \\ your ldap server
		'username' => 'cn=admin,dc=example,dc=com',    \\ admin cn
		'password' => 'password',                      \\ admin password
		'baseDn' => 'ou=Users,dc=example,dc=com',      \\ user base dn
		'bindRequiresDn' => TRUE                       \\ mandatory for OpenLDAP
	),
	'settings' => array(
		'userFilter' => 'uid'                          \\ user filter, usually uid for OpenLDAP
	)
);

Usage

Use like usual Laravel authentication

Caveat

Currently only tested with OpenLDAP because I dont have other LDAP Directory at disposal.

Thanks for being an exellent reference for this work:
ccovey/ldap-auth
franzliedke/auth-fluxbb

About

Auth service provider package for Laravel 4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages