Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-11-20 17:12:52 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-11-20 20:43:09 +0300
commit535000aac6ea0579e8f7468e4b7f6b822975ed86 (patch)
treef704d51f913e8c80613ce13aa94cf74c8adb5eea /lib/public
parent4ddea4bdfbc36e13f7b397a1d881ddff2d364419 (diff)
Make the post login event public
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/User/Events/PostLoginEvent.php76
1 files changed, 76 insertions, 0 deletions
diff --git a/lib/public/User/Events/PostLoginEvent.php b/lib/public/User/Events/PostLoginEvent.php
new file mode 100644
index 00000000000..7cc7aab4cd3
--- /dev/null
+++ b/lib/public/User/Events/PostLoginEvent.php
@@ -0,0 +1,76 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * 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.
+ *
+ * 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
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\User\Events;
+
+use OCP\EventDispatcher\Event;
+use OCP\IUser;
+
+/**
+ * @since 18.0.0
+ */
+class PostLoginEvent extends Event {
+
+ /** @var IUser */
+ private $user;
+
+ /** @var string */
+ private $password;
+
+ /** @var bool */
+ private $isTokenLogin;
+
+ /**
+ * @since 18.0.0
+ */
+ public function __construct(IUser $user, string $password, bool $isTokenLogin) {
+ parent::__construct();
+ $this->user = $user;
+ $this->password = $password;
+ $this->isTokenLogin = $isTokenLogin;
+ }
+
+ /**
+ * @since 18.0.0
+ */
+ public function getUser(): IUser {
+ return $this->user;
+ }
+
+ /**
+ * @since 18.0.0
+ */
+ public function getPassword(): string {
+ return $this->password;
+ }
+
+ /**
+ * @since 18.0.0
+ */
+ public function isTokenLogin(): bool {
+ return $this->isTokenLogin;
+ }
+}