Interface RedisCredentialsProvider

  • All Known Subinterfaces:
    RedisCredentialsProvider.ImmediateRedisCredentialsProvider
    All Known Implementing Classes:
    StaticCredentialsProvider
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface RedisCredentialsProvider
    Interface for loading RedisCredentials that are used for authentication. A commonly-used implementation is StaticCredentialsProvider for a fixed set of credentials.

    Credentials are requested by the driver after connecting to the server. Therefore, credential retrieval is subject to complete within the connection creation timeout to avoid connection failures.

    Since:
    6.2
    Author:
    Mark Paluch
    • Method Detail

      • resolveCredentials

        Mono<RedisCredentials> resolveCredentials()
        Returns RedisCredentials that can be used to authorize a Redis connection. Each implementation of RedisCredentialsProvider can choose its own strategy for loading credentials. For example, an implementation might load credentials from an existing key management system, or load new credentials when credentials are rotated. If an error occurs during the loading of credentials or credentials could not be found, a runtime exception will be raised.
        Returns:
        a Mono emitting RedisCredentials that can be used to authorize a Redis connection.