diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-22 08:59:10 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-22 16:32:04 +0100 |
commit | 226439a31c836a327ebd8b6a3171bcffa7250597 (patch) | |
tree | ecb7de6374f529ed156e5a293c08f87e32af99a0 /lib/public | |
parent | 6eb2088dd9c473b0d7c5b2a09a13d8ed8198b986 (diff) | |
download | nextcloud-server-226439a31c836a327ebd8b6a3171bcffa7250597.tar.gz nextcloud-server-226439a31c836a327ebd8b6a3171bcffa7250597.zip |
Add interfaces for user backend functionality
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/User/Backend/ICheckPasswordBackend.php | 29 | ||||
-rw-r--r-- | lib/public/User/Backend/ICountUsersBackend.php | 29 | ||||
-rw-r--r-- | lib/public/User/Backend/ICreateUserBackend.php | 29 | ||||
-rw-r--r-- | lib/public/User/Backend/IGetDisplayNameBackend.php | 29 | ||||
-rw-r--r-- | lib/public/User/Backend/IGetHomeBackend.php | 29 | ||||
-rw-r--r-- | lib/public/User/Backend/IProvideAvatarBackend.php | 29 | ||||
-rw-r--r-- | lib/public/User/Backend/ISetDisplayNameBackend.php | 29 | ||||
-rw-r--r-- | lib/public/User/Backend/ISetPasswordBackend.php | 29 |
8 files changed, 232 insertions, 0 deletions
diff --git a/lib/public/User/Backend/ICheckPasswordBackend.php b/lib/public/User/Backend/ICheckPasswordBackend.php new file mode 100644 index 00000000000..819a60bdc7d --- /dev/null +++ b/lib/public/User/Backend/ICheckPasswordBackend.php @@ -0,0 +1,29 @@ +<?php +declare(strict_types=1); +/** + * @copyright Copyright (c) 2018 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\Backend; + +interface ICheckPasswordBackend { + public function checkPassword(string $loginName, string $password): string; +} diff --git a/lib/public/User/Backend/ICountUsersBackend.php b/lib/public/User/Backend/ICountUsersBackend.php new file mode 100644 index 00000000000..506eddffcca --- /dev/null +++ b/lib/public/User/Backend/ICountUsersBackend.php @@ -0,0 +1,29 @@ +<?php +declare(strict_types=1); +/** + * @copyright Copyright (c) 2018 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\Backend; + +interface ICountUsersBackend { + public function countUsers(): int; +} diff --git a/lib/public/User/Backend/ICreateUserBackend.php b/lib/public/User/Backend/ICreateUserBackend.php new file mode 100644 index 00000000000..dec56d8808c --- /dev/null +++ b/lib/public/User/Backend/ICreateUserBackend.php @@ -0,0 +1,29 @@ +<?php +declare(strict_types=1); +/** + * @copyright Copyright (c) 2018 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\Backend; + +interface ICreateUserBackend { + public function createUser(string $uid, string $password): bool; +} diff --git a/lib/public/User/Backend/IGetDisplayNameBackend.php b/lib/public/User/Backend/IGetDisplayNameBackend.php new file mode 100644 index 00000000000..71c1635fc3e --- /dev/null +++ b/lib/public/User/Backend/IGetDisplayNameBackend.php @@ -0,0 +1,29 @@ +<?php +declare(strict_types=1); +/** + * @copyright Copyright (c) 2018 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\Backend; + +interface IGetDisplayNameBackend { + public function getDisplayName(string $uid): string; +} diff --git a/lib/public/User/Backend/IGetHomeBackend.php b/lib/public/User/Backend/IGetHomeBackend.php new file mode 100644 index 00000000000..a16c6eaba27 --- /dev/null +++ b/lib/public/User/Backend/IGetHomeBackend.php @@ -0,0 +1,29 @@ +<?php +declare(strict_types=1); +/** + * @copyright Copyright (c) 2018 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\Backend; + +interface IGetHomeBackend { + public function getHome(string $uid): string; +} diff --git a/lib/public/User/Backend/IProvideAvatarBackend.php b/lib/public/User/Backend/IProvideAvatarBackend.php new file mode 100644 index 00000000000..fa375932512 --- /dev/null +++ b/lib/public/User/Backend/IProvideAvatarBackend.php @@ -0,0 +1,29 @@ +<?php +declare(strict_types=1); +/** + * @copyright Copyright (c) 2018 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\Backend; + +interface IProvideAvatarBackend { + public function canChangeAvatar(string $uid): bool; +} diff --git a/lib/public/User/Backend/ISetDisplayNameBackend.php b/lib/public/User/Backend/ISetDisplayNameBackend.php new file mode 100644 index 00000000000..24b8316392c --- /dev/null +++ b/lib/public/User/Backend/ISetDisplayNameBackend.php @@ -0,0 +1,29 @@ +<?php +declare(strict_types=1); +/** + * @copyright Copyright (c) 2018 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\Backend; + +interface ISetDisplayNameBackend { + public function setDisplayName(string $uid, string $displayName): bool; +} diff --git a/lib/public/User/Backend/ISetPasswordBackend.php b/lib/public/User/Backend/ISetPasswordBackend.php new file mode 100644 index 00000000000..42affcc245e --- /dev/null +++ b/lib/public/User/Backend/ISetPasswordBackend.php @@ -0,0 +1,29 @@ +<?php +declare(strict_types=1); +/** + * @copyright Copyright (c) 2018 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\Backend; + +interface ISetPasswordBackend { + public function setPassword(string $uid, string $password): bool; +} |