]> source.dussan.org Git - nextcloud-server.git/commitdiff
Type the autentication provider passwords as nullable strings 29200/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Wed, 13 Oct 2021 08:54:44 +0000 (10:54 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Wed, 13 Oct 2021 15:17:25 +0000 (17:17 +0200)
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>
lib/private/Authentication/Token/DefaultTokenProvider.php
lib/private/Authentication/Token/IProvider.php
lib/private/Authentication/Token/PublicKeyTokenProvider.php

index a60c8b85b08078993afad168a86b01619c004dd7..c10d7f17bc2af1c51bf28b7a5b64785917fb3554 100644 (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 {
index b37fc2c8cf4d0566cd5928bc680f34336eafbed2..e604ac715c24cfc9e7b5a2d8a41fad8a18381268 100644 (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;
index e81493199049649f6b7420f3bbf2bfab63b0ba50..22c62d82fac059ed708320274974fee07375b21f 100644 (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 {