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
  • Method Details

    • createCredentialsProvider

      @Nullable default io.lettuce.core.RedisCredentialsProvider createCredentialsProvider(RedisConfiguration redisConfiguration)
      Create a RedisCredentialsProvider for data node authentication given RedisConfiguration.
      Parameters:
      redisConfiguration - the RedisConfiguration object.
      Returns:
      a RedisCredentialsProvider that emits RedisCredentials for data node authentication.
    • createSentinelCredentialsProvider

      default io.lettuce.core.RedisCredentialsProvider createSentinelCredentialsProvider(RedisSentinelConfiguration redisConfiguration)
      Create a RedisCredentialsProvider for Sentinel node authentication given RedisSentinelConfiguration.
      Parameters:
      redisConfiguration - the RedisSentinelConfiguration object.
      Returns:
      a RedisCredentialsProvider that emits RedisCredentials for sentinel authentication.