+ Auth::extend('api-token', function ($app, $name, array $config) {
+ return new ApiTokenGuard($app['request']);
+ });
+
+ Auth::extend('ldap-session', function ($app, $name, array $config) {
+ $provider = Auth::createUserProvider($config['provider']);
+ return new LdapSessionGuard(
+ $name,
+ $provider,
+ $this->app['session.store'],
+ $app[LdapService::class],
+ $app[RegistrationService::class]
+ );
+ });
+
+ Auth::extend('saml2-session', function ($app, $name, array $config) {
+ $provider = Auth::createUserProvider($config['provider']);
+ return new Saml2SessionGuard(
+ $name,
+ $provider,
+ $this->app['session.store'],
+ $app[RegistrationService::class]
+ );
+ });