2017 © Pedro Peláez
 

library laraldap-auth

ldap authentication for laravel

image

robrogers3/laraldap-auth

ldap authentication for laravel

  • Saturday, June 2, 2018
  • by robrogers3
  • Repository
  • 1 Watchers
  • 1 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 11 % Grown

The README.md

laraldap-auth: Authenticate against your Ldap Server

Latest Version on Packagist ![Software License][ico-license], (*1)

Drop in replacement for Laravel authentication against your ldap service., (*2)

Supporting OpenLDAP., (*3)

Install

Via Composer, (*4)

``` bash $ composer require robrogers3/laraldap-auth, (*5)



## Usage Add this to app.php in the services providers list ```php robrogers3\laradauth\LdapAuthServiceProvider::class,

Update config/auth.php, (*6)

``` php 'providers' => [ 'users' => [ 'driver' => 'ldap', 'model' => App\User::class, 'host' => 'host.example..com', 'domain' => 'example.com', 'base_dn' => 'cn=users,dc=cs-ds1-1,dc=home,dc=example,dc=com', 'user_dn' => 'uid' ], ],, (*7)


Create your database, and specify database connection options in .env and/or config/database.php Use Artisan to make auth and migrate Run: ```bash php artisan make:auth

If you are using Bootstrap 3 then you can publish the views to prevent user registration., (*8)

php artisan migrate
php artisan vendor:publish --force #force cause we override those in make auth.

You may be done. Go ahead and login., (*9)

Using AES to encrypt passwords

The LDAP passwords are saved in the User table. Normally they are encrypted wih BCrypt., (*10)

There is now AES support so you can safely exchange information from other applications that require an ldap login for authentication., (*11)

With AES and a shared key, you can encrypt and decrypt passwords on either side if you share the same AES key., (*12)

Here's the changes you need to make:, (*13)

  1. Add the packages HashServiceProvider to config/app.php
        /*
         * Package Service Providers...
         */
        robrogers3\laradauth\LdapAuthServiceProvider::class,
        robrogers3\laradauth\HashServiceProvider::class,

Update the config/hashing.php file like so., (*14)

    'driver' => 'aes',

    //more config here

    'aes' => [
        'key' => 'shared-secret-key'
    ]

Update your user database migration and add this column:, (*15)

            $table->string('user_name');

Then update your services.php config file, like so:, (*16)

    'ldap' => [
        'create-user-name' => true
    ]

Now you should be good to go., (*17)

Change log

Please see CHANGELOG for more information on what has changed recently., (*18)

Testing

bash $ composer test me not, (*19)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*20)

Security

If you discover any security related issues, please email robrogers@me.com instead of using the issue tracker., (*21)

Credits

License

The MIT License (MIT). Please see License File for more information., (*22)

The Versions

02/06 2018

dev-master

9999999-dev https://github.com/robrogers3/laraldap-auth

ldap authentication for laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel authentication ldap robrogers3 laraldap-auth

25/05 2018

1.1.1

1.1.1.0 https://github.com/robrogers3/laraldap-auth

ldap authentication for laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel authentication ldap robrogers3 laraldap-auth

24/05 2018

1.1.0

1.1.0.0 https://github.com/robrogers3/laraldap-auth

ldap authentication for laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel authentication ldap robrogers3 laraldap-auth

17/04 2017

1.0.1

1.0.1.0 https://github.com/robrogers3/laraldap-auth

ldap authentication for laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel authentication ldap robrogers3 laraldap-auth

17/04 2017

1.0.0

1.0.0.0 https://github.com/robrogers3/laraldap-auth

ldap authentication for laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel authentication ldap robrogers3 laraldap-auth