2021-10-20 16:39:13 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
2024-06-06 03:55:47 -04:00
|
|
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2021-10-20 16:39:13 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace OCA\Files_External\Lib\Auth\SMB;
|
|
|
|
|
|
|
|
|
|
use OCA\Files_External\Lib\Auth\AuthMechanism;
|
2021-10-29 12:27:30 -04:00
|
|
|
use OCA\Files_External\Lib\DefinitionParameter;
|
2021-10-20 16:39:13 -04:00
|
|
|
use OCP\Authentication\LoginCredentials\IStore;
|
|
|
|
|
use OCP\IL10N;
|
|
|
|
|
|
|
|
|
|
class KerberosApacheAuth extends AuthMechanism {
|
2024-10-18 06:04:22 -04:00
|
|
|
public function __construct(
|
|
|
|
|
IL10N $l,
|
|
|
|
|
private IStore $credentialsStore,
|
|
|
|
|
) {
|
2021-10-29 12:27:30 -04:00
|
|
|
$realm = new DefinitionParameter('default_realm', 'Default realm');
|
|
|
|
|
$realm
|
|
|
|
|
->setType(DefinitionParameter::VALUE_TEXT)
|
|
|
|
|
->setFlag(DefinitionParameter::FLAG_OPTIONAL)
|
|
|
|
|
->setTooltip($l->t('Kerberos default realm, defaults to "WORKGROUP"'));
|
2021-10-20 16:39:13 -04:00
|
|
|
$this
|
|
|
|
|
->setIdentifier('smb::kerberosapache')
|
|
|
|
|
->setScheme(self::SCHEME_SMB)
|
2022-01-21 02:17:19 -05:00
|
|
|
->setText($l->t('Kerberos ticket Apache mode'))
|
2021-10-29 12:27:30 -04:00
|
|
|
->addParameter($realm);
|
2021-10-20 16:39:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getCredentialsStore(): IStore {
|
|
|
|
|
return $this->credentialsStore;
|
|
|
|
|
}
|
|
|
|
|
}
|