Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0f95012

Browse files
feat: add Redis username authentication support (#66)
- Add username config option to Redis configuration - Support both username+password and password-only auth methods - Maintain backward compatibility with existing password-only setups - Improve error messages for authentication failures Signed-off-by: Sanil Shrestha <sanil.shrestha@formbay.com.au>
1 parent 19f8292 commit 0f95012

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/Handlers/RedisHandler.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,12 @@ public function __construct(protected QueueConfig $config)
4040
if (! $this->redis->connect($config->redis['host'], ($config->redis['host'][0] === '/' ? 0 : $config->redis['port']), $config->redis['timeout'])) {
4141
throw new CriticalError('Queue: Redis connection failed. Check your configuration.');
4242
}
43+
if (isset($config->redis['username'], $config->redis['password']) && ! $this->redis->auth([$config->redis['username'], $config->redis['password']])) {
44+
throw new CriticalError('Queue: Redis authentication failed. Check your username and password.');
45+
}
4346

4447
if (isset($config->redis['password']) && ! $this->redis->auth($config->redis['password'])) {
45-
throw new CriticalError('Queue: Redis authentication failed.');
48+
throw new CriticalError('Queue: Redis authentication failed. Check your password.');
4649
}
4750

4851
if (isset($config->redis['database']) && ! $this->redis->select($config->redis['database'])) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /