Skip to content
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

Add fix to be able to use NKey + Seed auth handler and username + pas… #1138

Merged

Conversation

ryad-eldajani
Copy link
Contributor

Updated PR based on discussion in #1129

When trying to connect to a NATS server with Auth Callout, the client may be required to use a combination of an auth handler (NKey + Seed) plus user info (username + password). Currently, only either auth handler or user info is append in the options when building the client options string.

AuthHandler authHandler = Nats.staticCredentials(jwt, nkey);
Options connectOptions = Options.builder()
.server(serverUri)
.authHandler(authHandler)
.userInfo(username, password)
.build();

This PR fixes the behavior in the client options to allow the usage of an auth handler in combination with username and password.

Copy link
Contributor

@scottf scottf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ryad-eldajani
Copy link
Contributor Author

Dear @scottf thanks for your review. Is there something missing or anything I can do to have this merged? Thanks in advance!

@scottf scottf merged commit 87b0abc into nats-io:main May 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants