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

Expectation when the credentials are not correct in HTTP Basic authentication #101

Open
amabdallah opened this issue Jan 29, 2019 · 0 comments

Comments

@amabdallah
Copy link

This authentication methods needs to return an error message if the username or pass do not match with HydroShare.

Right now, either way, "hs" returns a value. Not sure whats the best way to programatcily catch an expectation when the credentials are not correct.

To authenticate using HTTP Basic authentication, and then get a list of resources you have access to:

from hs_restclient import HydroShare, HydroShareAuthBasic
auth = HydroShareAuthBasic(username='myusername', password='mypassword')
hs = HydroShare(auth=auth)
for resource in hs.getResourceList():
    print(resource)
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

No branches or pull requests

1 participant