Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions lib/public/Authentication/IProvideUserSecretBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

namespace OCP\Authentication;

use OCP\HintException;

/**
* Interface IProvideUserSecretBackend
*
Expand All @@ -18,8 +20,14 @@ interface IProvideUserSecretBackend {
/**
* Optionally returns a stable per-user secret. This secret is for
* instance used to secure file encryption keys.
* @return string
*
* @return non-empty-string|null Returns the per-user secret if the backend
* is configured or null otherwise.
* @throws HintException when the backend is configured to return a per-user
* secret but is unable to do so.
*
* @since 23.0.0
* @since 35.0.0 The returns value is now optional.
*/
public function getCurrentUserSecret(): string;
public function getCurrentUserSecret(): ?string;
}
7 changes: 5 additions & 2 deletions lib/public/User/Backend/ICheckPasswordBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
*/
interface ICheckPasswordBackend {
/**
* @since 14.0.0
* Check if the password is correct without logging in the user
* returns the user id or false.
*
* @param string $loginName The loginname
* @param string $loginName The login name
* @param string $password The password
* @return string|false The uid on success false on failure
* @since 14.0.0
*
*/
public function checkPassword(string $loginName, string $password);
}
Loading