Merge pull request #29200 from nextcloud/enhancement/auth-token-provider-create-passwort-type-hint

Type the autentication provider passwords as nullable strings
This commit is contained in:
Daniel 2021-10-13 22:14:43 +02:00 committed by GitHub
commit efc3ed5bdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 {