Skip to content
Merged

Dev #546

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/Http/Controllers/SocialiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public function callback(Request $_request, string $provider)
$allow_createUser = false;
$allow_updateUser = false;
if (config($config_name)) {
$allow_createUser = config($config_name.'.allow_createUser', $allow_createUser);
$allow_updateUser = config($config_name.'.allow_updateUser', $allow_updateUser);
$allow_createUser = config($config_name.'.allow_create_User', $allow_createUser);
$allow_updateUser = config($config_name.'.allow_update_User', $allow_updateUser);
}
Log::debug('CONFIG: allow_createUser='.($allow_createUser ? 'true' : 'false'));
Log::debug('CONFIG: allow_updateUser='.($allow_updateUser ? 'true' : 'false'));
Expand Down
10 changes: 9 additions & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
use LdapRecord\Container;
use Log;

class AppServiceProvider extends ServiceProvider
Expand Down Expand Up @@ -36,7 +37,7 @@ public function boot()
URL::forceScheme('https');
}

if (Config::get('app.debug')) {
if (config('app.debug')) {
DB::listen(function ($query) {
Log::info(
$query->sql,
Expand All @@ -45,6 +46,13 @@ public function boot()
});
}

// Si le logging LDAP est activé, on force l’utilisation du channel "ldap"
if (config('ldap.logging.enabled')) {
Container::setLogger(
Log::channel('ldap')
);
}

if (in_array('keycloak', Config::get('services.socialite_controller.providers'))) {
Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
$event->extendSocialite('keycloak', \SocialiteProviders\Keycloak\Provider::class);
Expand Down
Loading