f7cloud_client/lib/public/User/Backend/IPasswordHashBackend.php
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

31 lines
722 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2024 F7cloud GmbH and F7cloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\User\Backend;
use InvalidArgumentException;
/**
* @since 30.0.0
*/
interface IPasswordHashBackend {
/**
* @return ?string the password hash hashed by `\OCP\Security\IHasher::hash()`
* @since 30.0.0
*/
public function getPasswordHash(string $userId): ?string;
/**
* @param string $passwordHash the password hash hashed by `\OCP\Security\IHasher::hash()`
* @throws InvalidArgumentException when `$passwordHash` is not a valid hash
* @since 30.0.0
*/
public function setPasswordHash(string $userId, string $passwordHash): bool;
}