|
|
@ -33,7 +33,7 @@ interface Driver { |
|
|
|
/** Lists all users */ |
|
|
|
public function userList(): array; |
|
|
|
|
|
|
|
/** sets a user's password |
|
|
|
/** Sets a user's password |
|
|
|
* |
|
|
|
* When given no password the implementation may return null; the user |
|
|
|
* manager will then generate a random password and try again with that |
|
|
@ -46,10 +46,35 @@ interface Driver { |
|
|
|
*/ |
|
|
|
public function userPasswordSet(string $user, ?string $newPassword, string $oldPassword = null); |
|
|
|
|
|
|
|
/** removes a user's password; this makes authentication fail unconditionally |
|
|
|
/** Removes a user's password; this makes authentication fail unconditionally |
|
|
|
* |
|
|
|
* @param string $user The user for whom to change the password |
|
|
|
* @param string|null $oldPassword The user's previous password, if known |
|
|
|
*/ |
|
|
|
public function userPasswordUnset(string $user, string $oldPassword = null): bool; |
|
|
|
|
|
|
|
/** Retrieves metadata about a user |
|
|
|
* |
|
|
|
* Any expected keys not returned by the driver are taken from the internal |
|
|
|
* database instead; the expected keys at this time are: |
|
|
|
* |
|
|
|
* - admin: A boolean denoting whether the user has administrator privileges |
|
|
|
* - lang: A BCP 47 language tag e.g. "en", "hy-Latn-IT-arevela" |
|
|
|
* - tz: A zoneinfo timezone e.g. "Asia/Jakarta", "America/Argentina/La_Rioja" |
|
|
|
* - sort_asc: A boolean denoting whether the user prefers articles to be sorted oldest-first |
|
|
|
* |
|
|
|
* Any other keys will be ignored. |
|
|
|
*/ |
|
|
|
public function userPropertiesGet(string $user): array; |
|
|
|
|
|
|
|
/** Sets metadata about a user |
|
|
|
* |
|
|
|
* Output should be the same as the input, unless input is changed prior to storage |
|
|
|
* (if it is, for instance, normalized in some way), which which case the changes |
|
|
|
* should be reflected in the output. |
|
|
|
* |
|
|
|
* @param string $user The user for which to set metadata |
|
|
|
* @param array $data The input data; see userPropertiesGet for keys |
|
|
|
*/ |
|
|
|
public function userPropertiesSet(string $user, array $data): array; |
|
|
|
} |
|
|
|