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 6fff3e8 commit 528e329
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 528e329

Please sign in to comment.