mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
docs: Add info for the password hashes
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
34d97d45cf
commit
d65f53184e
2 changed files with 8 additions and 0 deletions
|
|
@ -79,6 +79,7 @@ interface IUser {
|
|||
/**
|
||||
* Get the password hash of the user
|
||||
*
|
||||
* @return ?string the password hash hashed by `\OCP\Security\IHasher::hash()`
|
||||
* @since 30.0.0
|
||||
*/
|
||||
public function getPasswordHash(): ?string;
|
||||
|
|
@ -86,6 +87,8 @@ interface IUser {
|
|||
/**
|
||||
* Set the password hash of the user
|
||||
*
|
||||
* @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 $passwordHash): bool;
|
||||
|
|
|
|||
|
|
@ -9,16 +9,21 @@ declare(strict_types=1);
|
|||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue