New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

rici12/ldap-laravel-provider

Lean and simple Ldap provider for Laravel 5.1
79 2
Install
composer require rici12/ldap-laravel-provider
Latest Version:0.4
PHP:>=5.4.0
Laravel:5
License:MIT
Last Updated:Aug 17, 2015
Links: GitHub  ·  Packagist
Maintainer: RiCi12

LdapLaravelProvider

Lean and simple ldap provider for Laravel 5.1. Works only with Active Directory system.

When is this package useful?

When you need to authenticate your user against a ldap server (Active Directory system), while maintaining a users table in your database.

What is included?

A provider and its service provider.

How to install

In your composer.json, as a required dependency, insert:

"rici12/ldap-laravel-provider": "0.*"

Then run

composer update

After that, open config/app.php and add to your service providers list

RiCi12\LdapLaravelProvider\ServiceProvider\LdapServiceProvider::class

Then open config/auth.php and change your driver option

'driver' => 'ldap'

Open the .env file and add the required options

LDAPSERVER = auth.magrathea.com 
LDAPDOMAINNAME = MAGRATHEA\ 
USERNAMECREDENTIALSATTRIBUTE = username 
PASSWORDCREDENTIALSATTRIBUTE = password

Work flow

  1. Try to connect to the provided server
  2. Check if input credentials are correct
  3. If true, search for a user from users table (compairing 'username' attribute)
  4. Return the user, if found; otherwise, throws an Exception.

Use case

In my last project I needed to let the user authenticate with their domain credentials while not letting everybody get access to the homepage; plus, I was asked to implement a really simple roles system (read/write access). So i implemented this authentication service provider wich fits great with Laravel Auth system: you'll be able to access the user from Auth facade.

Related Packages

opspace/ldap-connector

Easily authenticate with LDAP in Laravel

174
t3chn0crat/laravel-ldap-connector

Authenticate with and fecth data from LDAP in Laravel

14 2
cirkut/ldap-connector

Easily authenticate with LDAP in Laravel

3 0
k/ldapp-connector

Easily authenticate with LDAP against a local database in Laravel

1 0
dvsa/authentication-ldap

A wrapper around LDAP

16,008 0

Version History

Version Released PHP Laravel License
0.4 >=5.4.0 5.1.* MIT
0.3 >=5.4.0 5.1.* MIT
0.2 >=5.4.0 5.1.* MIT
0.1 >=5.4.0 ^5.1.0 MIT