]> BookStack Code Mirror - bookstack/blob - app/Providers/AuthServiceProvider.php
Finished migration of last angular code
[bookstack] / app / Providers / AuthServiceProvider.php
1 <?php
2
3 namespace BookStack\Providers;
4
5 use Auth;
6 use BookStack\Services\LdapService;
7 use Illuminate\Support\ServiceProvider;
8
9 class AuthServiceProvider extends ServiceProvider
10 {
11     /**
12      * Bootstrap the application services.
13      *
14      * @return void
15      */
16     public function boot()
17     {
18         //
19     }
20
21     /**
22      * Register the application services.
23      *
24      * @return void
25      */
26     public function register()
27     {
28         Auth::provider('ldap', function($app, array $config) {
29             return new LdapUserProvider($config['model'], $app[LdapService::class]);
30         });
31     }
32 }