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

Extract credentials passed in Url #147

Merged
merged 1 commit into from
Aug 21, 2024
Merged

Extract credentials passed in Url #147

merged 1 commit into from
Aug 21, 2024

Conversation

russcam
Copy link
Contributor

@russcam russcam commented Sep 23, 2020

This commit extracts the credentials passed in a Url and
uses them to pass Basic Credentials when constructing
the single node Transport, as well as constructing a client
for elasticsearch integration tests.

Leaving the credentials in the Url and
also configuring credentials through .auth() fn, results
in reqwest sending two Authorization headers.

@russcam russcam added the bug Something isn't working label Sep 23, 2020
@russcam
Copy link
Contributor Author

russcam commented Sep 23, 2020

I think it might be good to expose a function somewhere that accepts a Url and returns a (Url, Option<Credentials>), as this operation may need to be performed for all Uris passed to construct a multi node connection pool when #139 lands.

This commit extracts the credentials passed in a Url and
uses them to pass Basic Credentials when constructing
the single node Transport, as well as constructing a client
for elasticsearch integration tests.

Leaving the credentials in the Url and
also configuring credentials through .auth() fn, results
in reqwest sending two Authorization headers.
Copy link
Member

@swallez swallez left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@swallez swallez merged commit 0c92c3a into main Aug 21, 2024
2 checks passed
@swallez swallez deleted the credentials-in-url branch August 21, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants