[reactor-optional] Deprecate RedisCredentialsProvider interface in favor of CredentialsProvider - #3837
Open
a-TODO-rov wants to merge 3 commits into
Open
[reactor-optional] Deprecate RedisCredentialsProvider interface in favor of CredentialsProvider#3837a-TODO-rov wants to merge 3 commits into
a-TODO-rov wants to merge 3 commits into
Conversation
atakavci
reviewed
Jul 13, 2026
Comment on lines
+37
to
+47
| /** | ||
| * Resolves the latest available credentials as a {@link CompletionStage}. | ||
| * | ||
| * @return a {@link CompletionStage} that completes with the {@link RedisCredentials} used to authorize a Redis connection. | ||
| * @since 7.7 | ||
| */ | ||
| @SuppressWarnings("deprecation") | ||
| default CompletionStage<RedisCredentials> resolveCredentialsAsync() { | ||
| return resolveCredentials().toFuture(); | ||
| } | ||
|
|
Collaborator
There was a problem hiding this comment.
this is not needed here anymore.
also moving subscribeToCredentials to new CredentialsProvider would help not confusing users.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
alternative approach of #3830 . This way we won't deprecate the abstract method of a Functionalinterface
Note
Medium Risk
Touches the public authentication/credential SPI and streaming re-auth path, but keeps backward-compatible defaults and does not yet migrate internal handlers to the new APIs.
Overview
Introduces
CredentialsProvider(7.7) as the replacement forRedisCredentialsProvider, withresolveCredentialsAsync()as the primary contract (CompletionStage) and a defaultresolveCredentials()that bridges to ReactorMono. The new type extends the old interface so existing implementations keep compiling without deprecating the functional-interface abstract method directly.RedisCredentialsProvideris marked deprecated (removal in 8.0) and gains forward-compatible defaults:resolveCredentialsAsync()fromMono, andsubscribeToCredentials(onNext, onError)returning a newSubscriptionhandle (replacing the deprecatedcredentials()Flux).CredentialsProvideralso addsfrom(Supplier)and anImmediateRedisCredentialsProvidernested type mirroring the old pattern.RedisAuthenticationHandler.subscribe()is unchanged in behavior; it only adds a deprecation suppression while still subscribing viacredentials(). Unit tests cover the async bridge and subscription close semantics.Reviewed by Cursor Bugbot for commit b8b2a25. Bugbot is set up for automated code reviews on this repo. Configure here.