aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Lib/Auth/SMB/KerberosApacheAuth.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/Lib/Auth/SMB/KerberosApacheAuth.php')
-rw-r--r--apps/files_external/lib/Lib/Auth/SMB/KerberosApacheAuth.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Auth/SMB/KerberosApacheAuth.php b/apps/files_external/lib/Lib/Auth/SMB/KerberosApacheAuth.php
new file mode 100644
index 00000000000..26671110294
--- /dev/null
+++ b/apps/files_external/lib/Lib/Auth/SMB/KerberosApacheAuth.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCA\Files_External\Lib\Auth\SMB;
+
+use OCA\Files_External\Lib\Auth\AuthMechanism;
+use OCA\Files_External\Lib\DefinitionParameter;
+use OCP\Authentication\LoginCredentials\IStore;
+use OCP\IL10N;
+
+class KerberosApacheAuth extends AuthMechanism {
+ public function __construct(
+ IL10N $l,
+ private IStore $credentialsStore,
+ ) {
+ $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"'));
+ $this
+ ->setIdentifier('smb::kerberosapache')
+ ->setScheme(self::SCHEME_SMB)
+ ->setText($l->t('Kerberos ticket Apache mode'))
+ ->addParameter($realm);
+ }
+
+ public function getCredentialsStore(): IStore {
+ return $this->credentialsStore;
+ }
+}