Interface RedisCredentialsProviderFactory
public interface RedisCredentialsProviderFactory
Factory interface to create
RedisCredentialsProvider
from a RedisConfiguration
. Credentials can be
associated with username
and/or password
.
Credentials are based off the given RedisConfiguration
objects. Changing the credentials in the actual object
affects the constructed RedisCredentials
object. Credentials are requested by the Lettuce client after
connecting to the host. Therefore, credential retrieval is subject to complete within the configured connection
creation timeout to avoid connection failures.
- Since:
- 3.0
- Author:
- Mark Paluch
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Default anonymousRedisCredentials
without username/password. -
Method Summary
Modifier and TypeMethodDescriptiondefault io.lettuce.core.RedisCredentialsProvider
createCredentialsProvider
(RedisConfiguration redisConfiguration) Create aRedisCredentialsProvider
for data node authentication givenRedisConfiguration
.default io.lettuce.core.RedisCredentialsProvider
createSentinelCredentialsProvider
(RedisSentinelConfiguration redisConfiguration) Create aRedisCredentialsProvider
for Sentinel node authentication givenRedisSentinelConfiguration
.
-
Method Details
-
createCredentialsProvider
@Nullable default io.lettuce.core.RedisCredentialsProvider createCredentialsProvider(RedisConfiguration redisConfiguration) Create aRedisCredentialsProvider
for data node authentication givenRedisConfiguration
.- Parameters:
redisConfiguration
- theRedisConfiguration
object.- Returns:
- a
RedisCredentialsProvider
that emitsRedisCredentials
for data node authentication.
-
createSentinelCredentialsProvider
default io.lettuce.core.RedisCredentialsProvider createSentinelCredentialsProvider(RedisSentinelConfiguration redisConfiguration) Create aRedisCredentialsProvider
for Sentinel node authentication givenRedisSentinelConfiguration
.- Parameters:
redisConfiguration
- theRedisSentinelConfiguration
object.- Returns:
- a
RedisCredentialsProvider
that emitsRedisCredentials
for sentinel authentication.
-