2016-07-22 04:46:29 -04:00
|
|
|
<?php
|
2024-05-29 05:32:54 -04:00
|
|
|
|
2016-07-22 04:46:29 -04:00
|
|
|
/**
|
2024-05-29 05:32:54 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2016-07-22 04:46:29 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCA\User_LDAP;
|
|
|
|
|
|
2019-11-22 14:52:10 -05:00
|
|
|
use OCP\IServerContainer;
|
2020-10-26 09:44:15 -04:00
|
|
|
use OCP\LDAP\ILDAPProvider;
|
2019-11-22 14:52:10 -05:00
|
|
|
use OCP\LDAP\ILDAPProviderFactory;
|
2016-07-22 04:46:29 -04:00
|
|
|
|
|
|
|
|
class LDAPProviderFactory implements ILDAPProviderFactory {
|
2020-10-26 09:44:15 -04:00
|
|
|
/** * @var IServerContainer */
|
2016-07-22 04:46:29 -04:00
|
|
|
private $serverContainer;
|
2020-10-26 09:44:15 -04:00
|
|
|
|
2016-07-22 04:46:29 -04:00
|
|
|
public function __construct(IServerContainer $serverContainer) {
|
|
|
|
|
$this->serverContainer = $serverContainer;
|
|
|
|
|
}
|
2020-10-26 09:44:15 -04:00
|
|
|
|
|
|
|
|
public function getLDAPProvider(): ILDAPProvider {
|
|
|
|
|
return $this->serverContainer->get(LDAPProvider::class);
|
2016-07-22 04:46:29 -04:00
|
|
|
}
|
2021-01-25 15:06:07 -05:00
|
|
|
|
|
|
|
|
public function isAvailable(): bool {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2016-07-22 04:46:29 -04:00
|
|
|
}
|