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

How to invoke config server using basic authentication #40

Closed
rmotapar opened this issue Oct 16, 2020 · 3 comments
Closed

How to invoke config server using basic authentication #40

rmotapar opened this issue Oct 16, 2020 · 3 comments
Labels
question Further information is requested

Comments

@rmotapar
Copy link

Hi,
Our spring config server is protected using basic authentication. Is it possible to use config-client to send a basic auth header with the request? If yes, an example would be very helpful.

Thanks!

@amenezes amenezes added the question Further information is requested label Oct 18, 2020
@amenezes
Copy link
Owner

@rmotapar,

Yes it's possible. Try use HTTPBasicAuth.

For example:

from requests.auth import HTTPBasicAuth

from config.spring import ConfigClient

client = ConfigClient(app_name="simpleweb000")
client.get_config(auth=HTTPBasicAuth('user', password))

I will update the project documentation with this question.

Thanks.

@amenezes
Copy link
Owner

@rmotapar the example solved your question?

The project documentation was been updated.

@rmotapar
Copy link
Author

@amenezes Thank you so much for the quick response. I have verified this using your example and it's working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants