1<?php 2 3declare(strict_types=1); 4 5/** 6 * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> 7 * 8 * @author Arthur Schiwon <blizzz@arthur-schiwon.de> 9 * @author Christoph Wurst <christoph@winzerhof-wurst.at> 10 * 11 * @license GNU AGPL version 3 or any later version 12 * 13 * This program is free software: you can redistribute it and/or modify 14 * it under the terms of the GNU Affero General Public License as 15 * published by the Free Software Foundation, either version 3 of the 16 * License, or (at your option) any later version. 17 * 18 * This program is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU Affero General Public License for more details. 22 * 23 * You should have received a copy of the GNU Affero General Public License 24 * along with this program. If not, see <http://www.gnu.org/licenses/>. 25 * 26 */ 27namespace OCP\User\Events; 28 29use OCP\EventDispatcher\Event; 30 31/** 32 * @since 18.0.0 33 */ 34class BeforeUserLoggedInEvent extends Event { 35 36 /** @var string */ 37 private $username; 38 39 /** @var string */ 40 private $password; 41 42 /** 43 * @since 18.0.0 44 */ 45 public function __construct(string $username, string $password) { 46 parent::__construct(); 47 $this->username = $username; 48 $this->password = $password; 49 } 50 51 /** 52 * returns the login name, which must not necessarily match to a user ID 53 * 54 * @since 18.0.0 55 */ 56 public function getUsername(): string { 57 return $this->username; 58 } 59 60 /** 61 * @since 18.0.0 62 */ 63 public function getPassword(): string { 64 return $this->password; 65 } 66} 67