PHP code example of klepak / nova-ad-auth

1. Go to this page and download the library: Download klepak/nova-ad-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/ */

    

klepak / nova-ad-auth example snippets


    'providers' => [
    
        ...

        App\Providers\NovaServiceProvider::class,
        Klepak\NovaAdAuth\AdAuthenticationServiceProvider::class,
    ];

    use Adldap\Laravel\Events\AuthenticatedWithWindows;
    use Klepak\NovaAdAuth\Listeners\SynchronizeUserPermissions;
    use Klepak\NovaAdAuth\Listeners\SynchronizeUserThumbnail;

    ...

    protected $listen = [
        
        ...

        AuthenticatedWithWindows::class => [
            SynchronizeUserPermissions::class,
            SynchronizeUserThumbnail::class,
        ],
    ];

protected $routeMiddleware = [
    
    ...

    'auth.sso' => \Adldap\Laravel\Middleware\WindowsAuthenticate::class,
    'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class,
    'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class,
];