X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/193d7fb3fe71a76a43ebc1ccdb617b4b627d1e09..refs/pull/3099/head:/app/Providers/AuthServiceProvider.php diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index cd90cc849..4a626e4fa 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -4,12 +4,10 @@ namespace BookStack\Providers; use BookStack\Api\ApiTokenGuard; use BookStack\Auth\Access\ExternalBaseUserProvider; +use BookStack\Auth\Access\Guards\AsyncExternalBaseSessionGuard; use BookStack\Auth\Access\Guards\LdapSessionGuard; -use BookStack\Auth\Access\Guards\Saml2SessionGuard; -use BookStack\Auth\Access\Guards\OpenIdSessionGuard; use BookStack\Auth\Access\LdapService; use BookStack\Auth\Access\LoginService; -use BookStack\Auth\Access\OpenIdService; use BookStack\Auth\Access\RegistrationService; use Illuminate\Support\Facades\Auth; use Illuminate\Support\ServiceProvider; @@ -39,27 +37,16 @@ class AuthServiceProvider extends ServiceProvider ); }); - Auth::extend('saml2-session', function ($app, $name, array $config) { + Auth::extend('async-external-session', function ($app, $name, array $config) { $provider = Auth::createUserProvider($config['provider']); - return new Saml2SessionGuard( + return new AsyncExternalBaseSessionGuard( $name, $provider, $app['session.store'], $app[RegistrationService::class] ); }); - - Auth::extend('openid-session', function ($app, $name, array $config) { - $provider = Auth::createUserProvider($config['provider']); - return new OpenIdSessionGuard( - $name, - $provider, - $this->app['session.store'], - $app[OpenIdService::class], - $app[RegistrationService::class] - ); - }); } /**