Skip to content

Conversation

@LUNEXTLABS-Tobi
Copy link

This implements a very basic handling of HTTP basic authentication

For this to work, the proxy will add a HTTPBasicAuthHandler with a HTTPPasswordMgrWithDefaultRealm to its opener. Whenever a server returns a 401 "Unauthorized", now urllib2 will automatically present supplied HTTP basic auth credentials.

The only thing users have to change in their code, in order to use basic authentication, is adding a parameter basic_auth=(url, user, pw) to their instantiation of odoorpc.

@LUNEXTLABS-Tobi LUNEXTLABS-Tobi marked this pull request as draft October 30, 2023 15:41
@LUNEXTLABS-Tobi
Copy link
Author

Looks like odoorpc already supports handling basic-auth by adjusting custom opener. If this holds true, please simply reject this PR.

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.

1 participant