Skip to content

Commit

Permalink
StreamingCredentialsProvider replaced with RedisCredentialsProvider.s…
Browse files Browse the repository at this point in the history
…upportsStreaming()
  • Loading branch information
ggivo committed Dec 18, 2024
1 parent 00de1ce commit 0e0f502
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.lettuce.authx;

import io.lettuce.core.RedisCredentials;
import io.lettuce.core.StreamingCredentialsProvider;
import io.lettuce.core.RedisCredentialsProvider;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Sinks;
Expand All @@ -10,7 +10,7 @@
import redis.clients.authentication.core.TokenListener;
import redis.clients.authentication.core.TokenManager;

public class TokenBasedRedisCredentialsProvider implements StreamingCredentialsProvider, AutoCloseable {
public class TokenBasedRedisCredentialsProvider implements RedisCredentialsProvider, AutoCloseable {

private final TokenManager tokenManager;

Expand Down Expand Up @@ -88,6 +88,11 @@ public Flux<RedisCredentials> credentials() {
return credentialsSink.asFlux().onBackpressureLatest(); // Provide a continuous stream of credentials
}

@Override
public boolean supportsStreaming() {
return true;
}

/**
* Stop the credentials provider and clean up resources.
* <p>
Expand Down

0 comments on commit 0e0f502

Please sign in to comment.