"%s liigutamine ebaõnnestus", "Unable to rename file" => "Faili ümbernimetamine ebaõnnestus", "No file was uploaded. Unknown error" => "Ühtegi faili ei laetud üles. Tundmatu viga", "There is no error, the file uploaded with success" => "Ühtegi viga pole, fail on üles laetud", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Üles laetud faili suurus ületab HTML vormis määratud upload_max_filesize suuruse", "The uploaded file was only partially uploaded" => "Fail laeti üles ainult osaliselt", "No file was uploaded" => "Ühtegi faili ei laetud üles", "Missing a temporary folder" => "Ajutiste failide kaust puudub", "Failed to write to disk" => "Kettale kirjutamine ebaõnnestus", "Not enough storage available" => "Saadaval pole piisavalt ruumi", "Invalid directory." => "Vigane kaust.", "Files" => "Failid", "Delete permanently" => "Kustuta jäädavalt", "Delete" => "Kustuta", "Rename" => "ümber", "Pending" => "Ootel", "{new_name} already exists" => "{new_name} on juba olemas", "replace" => "asenda", "suggest name" => "soovita nime", "cancel" => "loobu", "replaced {new_name} with {old_name}" => "asendas nime {old_name} nimega {new_name}", "undo" => "tagasi", "'.' is an invalid file name." => "'.' on vigane failinimi.", "File name cannot be empty." => "Faili nimi ei saa olla tühi.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Vigane nimi, '\\', '/', '<', '>', ':', '\"', '|', '?' ja '*' pole lubatud.", "Unable to upload your file as it is a directory or has 0 bytes" => "Sinu faili üleslaadimine ebaõnnestus, kuna see on kaust või selle suurus on 0 baiti", "Upload Error" => "Üleslaadimise viga", "Close" => "Sulge", "1 file uploading" => "1 faili üleslaadimisel", "{count} files uploading" => "{count} faili üleslaadimist", "Upload cancelled." => "Üleslaadimine tühistati.", "File upload is in progress. Leaving the page now will cancel the upload." => "Faili üleslaadimine on töös. Lehelt lahkumine katkestab selle üleslaadimise.", "URL cannot be empty." => "URL ei saa olla tühi.", "Name" => "Nimi", "Size" => "Suurus", "Modified" => "Muudetud", "1 folder" => "1 kaust", "{count} folders" => "{count} kausta", "1 file" => "1 fail", "{count} files" => "{count} faili", "Upload" => "Lae üles", "File handling" => "Failide käsitlemine", "Maximum upload size" => "Maksimaalne üleslaadimise suurus", "max. possible: " => "maks. võimalik: ", "Needed for multi-file and folder downloads." => "Vajalik mitme faili ja kausta allalaadimiste jaoks.", "Enable ZIP-download" => "Luba ZIP-ina allalaadimine", "0 is unlimited" => "0 tähendab piiramatut", "Maximum input size for ZIP files" => "Maksimaalne ZIP-faili sisestatava faili suurus", "Save" => "Salvesta", "New" => "Uus", "Text file" => "Tekstifail", "Folder" => "Kaust", "From link" => "Allikast", "Cancel upload" => "Tühista üleslaadimine", "Nothing in here. Upload something!" => "Siin pole midagi. Lae midagi üles!", "Download" => "Lae alla", "Unshare" => "Lõpeta jagamine", "Upload too large" => "Üleslaadimine on liiga suur", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Failid, mida sa proovid üles laadida, ületab serveri poolt üleslaetavatele failidele määratud maksimaalse suuruse.", "Files are being scanned, please wait." => "Faile skannitakse, palun oota", "Current scanning" => "Praegune skannimine" ); e_warn_encrypt_all Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/apps/federation/lib/DAV/FedAuth.php
blob: 21c0d61487c093381ead37b79cd5d973684418f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
 * @author Thomas Müller <thomas.mueller@tmit.eu>
 *
 * @copyright Copyright (c) 2016, ownCloud, Inc.
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */
namespace OCA\Federation\DAV;

use OCA\Federation\DbHandler;
use Sabre\DAV\Auth\Backend\AbstractBasic;

class FedAuth extends AbstractBasic {

	/** @var DbHandler */
	private $db;

	/**
	 * FedAuth constructor.
	 *
	 * @param DbHandler $db
	 */
	public function __construct(DbHandler $db) {
		$this->db = $db;
		$this->principalPrefix = 'principals/system/';

		// setup realm
		$defaults = new \OC_Defaults();
		$this->realm = $defaults->getName();
	}

	/**
	 * Validates a username and password
	 *
	 * This method should return true or false depending on if login
	 * succeeded.
	 *
	 * @param string $username
	 * @param string $password
	 * @return bool
	 */
	protected function validateUserPass($username, $password) {
		return $this->db->auth($username, $password);
	}
}