Skip to content

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

@amabdallah

Description

@amabdallah

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions