2017-25 © Pedro Peláez
 

library ldap-eloquent-auth

Laravel 5 auth provider for LDAP and AD

image

rodrigopedra/ldap-eloquent-auth

Laravel 5 auth provider for LDAP and AD

  • Thursday, July 13, 2017
  • by rodrigo.pedra
  • Repository
  • 1 Watchers
  • 2 Stars
  • 67 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

LDAP Auth for laravel

Based on a gist by rezen https://gist.github.com/rezen/ee5451eabea6e581256a, (*1)

Added the ability to query the database to check if the user is authorized to use the app., (*2)

Installation

composer require rodrigopedra/ldap-eloquent-auth

Configuration

In your terminal/shell run, (*3)

php artisan vendor:publish --provider="RodrigoPedra\LDAP\LDAPServiceProvider"

Then change this values in your files:, (*4)

// in your config/app.php add the provider to the service providers key

'providers' => [
    /* ... */

    'RodrigoPedra\LDAP\LDAPServiceProvider',
]
// in your config/auth.php

    'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'ldap',
        ],
    ],

    'providers' => [
        'ldap' => [
            'driver' => 'ldap-auth',
            'model' => App\User::class,
        ],
    ],

<?php

// in your config/ldap.php
return [
    'servers' => [
        'default' => [
            'server' => env( 'LDAP_SERVER' ),
            'domain' => env( 'LDAP_DOMAIN' ),
        ],
        'other' => [
            'server' => 'OTHER_SERVER',
            'domain' => 'OTHER_DOMAIN',
        ], 
        // ...
        // you can specify multiple servers, the driver will   
        // try to log the user in the order specified here
    ],
];

Also, add a username field to your user migration, (*5)

// create_user_table migration
$table->string('username')->unique();

License

This package is open-sourced software licensed under the MIT license, (*6)

The Versions

13/07 2017

dev-master

9999999-dev

Laravel 5 auth provider for LDAP and AD

  Sources   Download

MIT

The Requires

 

by Rodrigo Pedra Brum

laravel auth ldap ad

13/07 2017

v2.0

2.0.0.0

Laravel 5 auth provider for LDAP and AD

  Sources   Download

MIT

The Requires

 

by Rodrigo Pedra Brum

laravel auth ldap ad

26/12 2015

v1.1

1.1.0.0

Laravel 5 auth provider for LDAP and AD

  Sources   Download

MIT

The Requires

 

by Rodrigo Pedra Brum

laravel auth ldap ad

26/12 2015

v1.0

1.0.0.0

Laravel 5 auth provider for LDAP and AD

  Sources   Download

MIT

The Requires

 

by Rodrigo Pedra Brum

laravel auth ldap ad