Skip to content

Commit b54e98a

Browse files
Merge pull request #60898 from nextcloud/carl/user-interface
fix: Make the IProvideUserSecretBackend usable
2 parents b5fb529 + d49df48 commit b54e98a

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

lib/public/Authentication/IProvideUserSecretBackend.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
namespace OCP\Authentication;
1111

12+
use OCP\HintException;
13+
1214
/**
1315
* Interface IProvideUserSecretBackend
1416
*
@@ -18,8 +20,14 @@ interface IProvideUserSecretBackend {
1820
/**
1921
* Optionally returns a stable per-user secret. This secret is for
2022
* instance used to secure file encryption keys.
21-
* @return string
23+
*
24+
* @return non-empty-string|null Returns the per-user secret if the backend
25+
* is configured or null otherwise.
26+
* @throws HintException when the backend is configured to return a per-user
27+
* secret but is unable to do so.
28+
*
2229
* @since 23.0.0
30+
* @since 35.0.0 The returns value is now optional.
2331
*/
24-
public function getCurrentUserSecret(): string;
32+
public function getCurrentUserSecret(): ?string;
2533
}

lib/public/User/Backend/ICheckPasswordBackend.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@
1414
*/
1515
interface ICheckPasswordBackend {
1616
/**
17-
* @since 14.0.0
17+
* Check if the password is correct without logging in the user
18+
* returns the user id or false.
1819
*
19-
* @param string $loginName The loginname
20+
* @param string $loginName The login name
2021
* @param string $password The password
2122
* @return string|false The uid on success false on failure
23+
* @since 14.0.0
24+
*
2225
*/
2326
public function checkPassword(string $loginName, string $password);
2427
}

0 commit comments

Comments
 (0)