@@ -91,12 +91,12 @@ protected function onLoginSuccess(Request $request, Response $response, TokenInt
9191 /**
9292 * Generates the cookie value.
9393 *
94- * @param int $expires The Unix timestamp when the cookie expires
95- * @param string $password The encoded password
94+ * @param int $expires The Unix timestamp when the cookie expires
95+ * @param string|null $password The encoded password
9696 *
9797 * @return string
9898 */
99- protected function generateCookieValue (string $ class , string $ username , int $ expires , string $ password )
99+ protected function generateCookieValue (string $ class , string $ username , int $ expires , ? string $ password )
100100 {
101101 // $username is encoded because it might contain COOKIE_DELIMITER,
102102 // we assume other values don't
@@ -111,12 +111,12 @@ protected function generateCookieValue(string $class, string $username, int $exp
111111 /**
112112 * Generates a hash for the cookie to ensure it is not being tampered with.
113113 *
114- * @param int $expires The Unix timestamp when the cookie expires
115- * @param string $password The encoded password
114+ * @param int $expires The Unix timestamp when the cookie expires
115+ * @param string|null $password The encoded password
116116 *
117117 * @return string
118118 */
119- protected function generateCookieHash (string $ class , string $ username , int $ expires , string $ password )
119+ protected function generateCookieHash (string $ class , string $ username , int $ expires , ? string $ password )
120120 {
121121 return hash_hmac ('sha256 ' , $ class .self ::COOKIE_DELIMITER .$ username .self ::COOKIE_DELIMITER .$ expires .self ::COOKIE_DELIMITER .$ password , $ this ->getSecret ());
122122 }
0 commit comments