PHP code example of amoschou / laravel-remote-auth

1. Go to this page and download the library: Download amoschou/laravel-remote-auth library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

amoschou / laravel-remote-auth example snippets




namespace App\Models;

use AMoschou\RemoteAuth\App\Models\User as BaseUser;

class User extends BaseUser {}

'providers' => [
    'ldap-1' => Ldap::class,
    'ldap-2' => Ldap::class,
    'csv-1' => Csv::class,
    'app' => App::class,
],

'settings' => [
    'ldap-1' => [
        'connection' => ...,
        'options' => ...,
        'domain' => ...,
        'search' => ...,
        'profile_map' => [
            'username' => 'uid',
            'last_name' => 'sn',
            'display_name' => 'cn',
            'phone' => 'telephonenumber',
            'email' => 'mail',
            'groups' => 'memberof',
        ],
    ],
    'csv-1' => [
        'connection' => ...,
        'header_offset' => ...,
        'header' => ...,
    ],
sh
php artisan vendor:publish --tag=remote-auth-config
php artisan vendor:publish --tag=remote-auth-views
sh
php artisan migrate