Added files missed in previous commit

This commit is contained in:
Dan Brown
2020-02-02 10:59:03 +00:00
parent 3470a6a140
commit e743cd3f60
21 changed files with 139 additions and 229 deletions

View File

@ -6,6 +6,7 @@ use Auth;
use BookStack\Api\ApiTokenGuard;
use BookStack\Auth\Access\ExternalBaseUserProvider;
use BookStack\Auth\Access\Guards\LdapSessionGuard;
use BookStack\Auth\Access\Guards\Saml2SessionGuard;
use BookStack\Auth\Access\LdapService;
use BookStack\Auth\UserRepo;
use Illuminate\Support\ServiceProvider;
@ -33,6 +34,16 @@ class AuthServiceProvider extends ServiceProvider
$app[UserRepo::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[UserRepo::class]
);
});
}
/**