[improve][broker] Documentation for AuthenticationState contract #19283
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.
PIP 97: #12105
Motivation
While working on PIP 97, I noticed that we do not have a clear contract for the
AuthenticationState
interface. We use the interface in one way in theServerCnx
class, but some of our official implementations do not align with the usage and the API. The PR itself provides my proposed authoritative documentation.When we agree on the content of this PR, I will follow up with some changes to the
TokenAuthenticationState
class and potentially others.Modifications
AuthenticationState
interface will be used by Pulsar.Verifying this change
I have studied the code closely to understand how it works, and more importantly, how it should work.
Does this pull request potentially affect one of the following parts:
This change could affect how plugins interact with the
AuthenticationState
object.Documentation
doc
This is a documentation change.