Type the autentication provider passwords as nullable strings

For historic reasons we couldn't add a nullable type hint before
nullable type hints were supported by our target php versions. This is
now possible.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2021-10-13 10:54:44 +02:00
parent 581862b51b
commit 01b8291c76
No known key found for this signature in database
GPG key ID: CC42AC2A7F0E56D8
3 changed files with 4 additions and 13 deletions

View file

@ -71,21 +71,12 @@ class DefaultTokenProvider implements IProvider {
}
/**
* Create and persist a new token
*
* @param string $token
* @param string $uid
* @param string $loginName
* @param string|null $password
* @param string $name
* @param int $type token type
* @param int $remember whether the session token should be used for remember-me
* @return IToken
* {@inheritDoc}
*/
public function generateToken(string $token,
string $uid,
string $loginName,
$password,
?string $password,
string $name,
int $type = IToken::TEMPORARY_TOKEN,
int $remember = IToken::DO_NOT_REMEMBER): IToken {

View file

@ -53,7 +53,7 @@ interface IProvider {
public function generateToken(string $token,
string $uid,
string $loginName,
$password,
?string $password,
string $name,
int $type = IToken::TEMPORARY_TOKEN,
int $remember = IToken::DO_NOT_REMEMBER): IToken;

View file

@ -80,7 +80,7 @@ class PublicKeyTokenProvider implements IProvider {
public function generateToken(string $token,
string $uid,
string $loginName,
$password,
?string $password,
string $name,
int $type = IToken::TEMPORARY_TOKEN,
int $remember = IToken::DO_NOT_REMEMBER): IToken {