Skip to content

Commit c693a67

Browse files
authored
Merge pull request #546 from dbarzin/dev
Dev
2 parents 45bd8e8 + 29c8f7e commit c693a67

File tree

6 files changed

+1225
-1048
lines changed

6 files changed

+1225
-1048
lines changed

app/Http/Controllers/SocialiteController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public function callback(Request $_request, string $provider)
6868
$allow_createUser = false;
6969
$allow_updateUser = false;
7070
if (config($config_name)) {
71-
$allow_createUser = config($config_name.'.allow_createUser', $allow_createUser);
72-
$allow_updateUser = config($config_name.'.allow_updateUser', $allow_updateUser);
71+
$allow_createUser = config($config_name.'.allow_create_User', $allow_createUser);
72+
$allow_updateUser = config($config_name.'.allow_update_User', $allow_updateUser);
7373
}
7474
Log::debug('CONFIG: allow_createUser='.($allow_createUser ? 'true' : 'false'));
7575
Log::debug('CONFIG: allow_updateUser='.($allow_updateUser ? 'true' : 'false'));

app/Providers/AppServiceProvider.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Support\Facades\Event;
99
use Illuminate\Support\Facades\URL;
1010
use Illuminate\Support\ServiceProvider;
11+
use LdapRecord\Container;
1112
use Log;
1213

1314
class AppServiceProvider extends ServiceProvider
@@ -36,7 +37,7 @@ public function boot()
3637
URL::forceScheme('https');
3738
}
3839

39-
if (Config::get('app.debug')) {
40+
if (config('app.debug')) {
4041
DB::listen(function ($query) {
4142
Log::info(
4243
$query->sql,
@@ -45,6 +46,13 @@ public function boot()
4546
});
4647
}
4748

49+
// Si le logging LDAP est activé, on force l’utilisation du channel "ldap"
50+
if (config('ldap.logging.enabled')) {
51+
Container::setLogger(
52+
Log::channel('ldap')
53+
);
54+
}
55+
4856
if (in_array('keycloak', Config::get('services.socialite_controller.providers'))) {
4957
Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
5058
$event->extendSocialite('keycloak', \SocialiteProviders\Keycloak\Provider::class);

0 commit comments

Comments
 (0)