Skip to content

Commit efc3ed5

Browse files
authored
Merge pull request #29200 from nextcloud/enhancement/auth-token-provider-create-passwort-type-hint
Type the autentication provider passwords as nullable strings
2 parents b7ee885 + 01b8291 commit efc3ed5

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

lib/private/Authentication/Token/DefaultTokenProvider.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,12 @@ public function __construct(DefaultTokenMapper $mapper,
7171
}
7272

7373
/**
74-
* Create and persist a new token
75-
*
76-
* @param string $token
77-
* @param string $uid
78-
* @param string $loginName
79-
* @param string|null $password
80-
* @param string $name
81-
* @param int $type token type
82-
* @param int $remember whether the session token should be used for remember-me
83-
* @return IToken
74+
* {@inheritDoc}
8475
*/
8576
public function generateToken(string $token,
8677
string $uid,
8778
string $loginName,
88-
$password,
79+
?string $password,
8980
string $name,
9081
int $type = IToken::TEMPORARY_TOKEN,
9182
int $remember = IToken::DO_NOT_REMEMBER): IToken {

lib/private/Authentication/Token/IProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ interface IProvider {
5353
public function generateToken(string $token,
5454
string $uid,
5555
string $loginName,
56-
$password,
56+
?string $password,
5757
string $name,
5858
int $type = IToken::TEMPORARY_TOKEN,
5959
int $remember = IToken::DO_NOT_REMEMBER): IToken;

lib/private/Authentication/Token/PublicKeyTokenProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function __construct(PublicKeyTokenMapper $mapper,
8080
public function generateToken(string $token,
8181
string $uid,
8282
string $loginName,
83-
$password,
83+
?string $password,
8484
string $name,
8585
int $type = IToken::TEMPORARY_TOKEN,
8686
int $remember = IToken::DO_NOT_REMEMBER): IToken {

0 commit comments

Comments
 (0)