diff --git a/Sources/NIORedis/Commands/BasicCommands.swift b/Sources/NIORedis/Commands/BasicCommands.swift index 156d544..0cd0a76 100644 --- a/Sources/NIORedis/Commands/BasicCommands.swift +++ b/Sources/NIORedis/Commands/BasicCommands.swift @@ -25,17 +25,6 @@ extension RedisClient { .mapFromRESP() } - /// Request for authentication in a password-protected Redis server. - /// - /// [https://redis.io/commands/auth](https://redis.io/commands/auth) - /// - Parameter password: The password being used to access the Redis server. - /// - Returns: An `EventLoopFuture` that resolves when the connection has been authorized, or fails with a `RedisError`. - @inlinable - public func authorize(with password: String) -> EventLoopFuture { - return send(command: "AUTH", with: [password]) - .map { _ in return () } - } - /// Select the Redis logical database having the specified zero-based numeric index. /// - Note: New connections always use the database `0`. /// diff --git a/Sources/NIORedis/RedisClient.swift b/Sources/NIORedis/RedisClient.swift index 02f64c7..9bff4e2 100644 --- a/Sources/NIORedis/RedisClient.swift +++ b/Sources/NIORedis/RedisClient.swift @@ -161,7 +161,8 @@ extension RedisConnection { guard let pw = password else { return eventLoopGroup.next().makeSucceededFuture(client) } - return client.authorize(with: pw) + + return client.send(command: "AUTH", with: [pw]) .map { _ in return client } } }