1
0

KerberosApacheAuth.php 973 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\Files_External\Lib\Auth\SMB;
  7. use OCA\Files_External\Lib\Auth\AuthMechanism;
  8. use OCA\Files_External\Lib\DefinitionParameter;
  9. use OCP\Authentication\LoginCredentials\IStore;
  10. use OCP\IL10N;
  11. class KerberosApacheAuth extends AuthMechanism {
  12. public function __construct(
  13. IL10N $l,
  14. private IStore $credentialsStore,
  15. ) {
  16. $realm = new DefinitionParameter('default_realm', 'Default realm');
  17. $realm
  18. ->setType(DefinitionParameter::VALUE_TEXT)
  19. ->setFlag(DefinitionParameter::FLAG_OPTIONAL)
  20. ->setTooltip($l->t('Kerberos default realm, defaults to "WORKGROUP"'));
  21. $this
  22. ->setIdentifier('smb::kerberosapache')
  23. ->setScheme(self::SCHEME_SMB)
  24. ->setText($l->t('Kerberos ticket Apache mode'))
  25. ->addParameter($realm);
  26. }
  27. public function getCredentialsStore(): IStore {
  28. return $this->credentialsStore;
  29. }
  30. }