From 35ac1e31db3967bdf65fd88abac717772d13f361 Mon Sep 17 00:00:00 2001 From: Adrien Cantepie Date: Sat, 20 Feb 2021 15:56:25 +0100 Subject: [PATCH] Update auth phpDoc --- src/Redis.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Redis.php b/src/Redis.php index 1405338..dd0016d 100644 --- a/src/Redis.php +++ b/src/Redis.php @@ -2188,15 +2188,19 @@ public function dbSize() } /** - * Authenticate the connection using a password. + * Authenticate the connection using a password or a username and password.. * Warning: The password is sent in plain-text over the network. * - * @param string $password + * @param mixed $password * * @return bool TRUE if the connection is authenticated, FALSE otherwise * * @link https://redis.io/commands/auth - * @example $redis->auth('foobared'); + * @example + *
+     * $redis->auth('bar'); // Authenticate with the password 'bar'
+     * $redis->auth(['user' => 'foo', 'pass' => 'bar]); // Authenticate with the username 'foo', and password 'bar' 
+     * 
*/ public function auth($password) {