-
Notifications
You must be signed in to change notification settings - Fork 623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setting a custom Authenticator #1242
Conversation
Signed-off-by: Alex Lourie <djay.il@gmail.com>
@Zariel, @magaldima something along these lines? If this looks the right direction, I'll add the failure when can't create the |
I'm specifically worried now that the input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also check if a config has both set and error out during session creation.
cluster.go
Outdated
Consistency Consistency // default consistency level (default: Quorum) | ||
Compressor Compressor // compression algorithm (default: nil) | ||
Authenticator Authenticator // authenticator (default: nil) | ||
AuthProvider func(h string) (Authenticator, error) // an authenticator factory. Can be used to create alternative authenticators (default: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should take a HostInfo
conn.go
Outdated
if cfg.AuthProvider != nil { | ||
c.auth, err = cfg.AuthProvider(host.ConnectAddress().String()) | ||
if err != nil { | ||
// Fail? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
Signed-off-by: Alex Lourie <djay.il@gmail.com>
Fixes #1238
Fixes #1109
Signed-off-by: Alex Lourie djay.il@gmail.com