2022-04-04 11:01:30 +00:00
|
|
|
<?php
|
2025-01-15 17:11:47 +00:00
|
|
|
|
2022-04-04 11:01:30 +00:00
|
|
|
/**
|
2022-04-20 18:04:31 +00:00
|
|
|
* @copyright Copyright (c) 2022, MetaProvide Holding EKF
|
|
|
|
* @author Ron Trevor <ecoron@proton.me>
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
2022-04-04 11:01:30 +00:00
|
|
|
*
|
2022-04-20 18:04:31 +00:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2022-04-04 11:01:30 +00:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2022-04-20 18:04:31 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2022-04-04 11:01:30 +00:00
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
2022-04-20 18:04:31 +00:00
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2022-04-04 11:01:30 +00:00
|
|
|
*/
|
2024-08-20 17:31:54 +00:00
|
|
|
|
2022-04-25 11:52:04 +00:00
|
|
|
namespace OCA\Files_External_Ethswarm\Auth;
|
2022-04-04 11:01:30 +00:00
|
|
|
|
|
|
|
use OCA\Files_External\Lib\Auth\AuthMechanism;
|
|
|
|
use OCA\Files_External\Lib\DefinitionParameter;
|
|
|
|
use OCP\IL10N;
|
|
|
|
|
|
|
|
/**
|
2025-01-15 17:11:47 +00:00
|
|
|
* Basic Http Authentication.
|
2022-04-04 11:01:30 +00:00
|
|
|
*/
|
2025-01-15 17:11:47 +00:00
|
|
|
class License extends AuthMechanism {
|
2024-08-20 17:31:54 +00:00
|
|
|
/** @const string */
|
2024-08-12 14:50:32 +00:00
|
|
|
public const SCHEME_ACCESS_KEY = 'access_key';
|
2022-04-04 11:01:30 +00:00
|
|
|
|
2025-01-15 17:11:47 +00:00
|
|
|
public function __construct(IL10N $l) {
|
2022-04-04 11:01:30 +00:00
|
|
|
$this
|
2024-08-12 14:50:32 +00:00
|
|
|
->setIdentifier('access:key')
|
|
|
|
->setScheme(self::SCHEME_ACCESS_KEY)
|
2025-03-07 15:44:03 +00:00
|
|
|
->setText($l->t('Access Key'))
|
2022-04-04 11:01:30 +00:00
|
|
|
->addParameters([
|
2024-08-20 15:06:08 +00:00
|
|
|
(new DefinitionParameter(self::SCHEME_ACCESS_KEY, $l->t('Access Key')))
|
2025-03-07 15:44:03 +00:00
|
|
|
->setTooltip($l->t('Access Key'))
|
2024-08-20 15:06:08 +00:00
|
|
|
->setType(DefinitionParameter::VALUE_PASSWORD),
|
2025-01-15 17:11:47 +00:00
|
|
|
])
|
|
|
|
;
|
2022-04-04 11:01:30 +00:00
|
|
|
}
|
|
|
|
}
|