Closed vedina closed 1 year ago
Hey @vedina - I think if you use: h5pyd.File(domain_path, api_key=bearer_token)
, it should just work. See: https://github.com/HDFGroup/h5pyd/blob/master/h5pyd/_hl/httpconn.py#L330. The api_key param can be just a string that is passed to the server or a dict with openid params to prompt the user to authenticate.
I haven't tried this myself, so let me know how it goes.
Thanks, passing the token as api_key works.
Awesome! Glad that works!
I would like to pass existing and valid
Authorization: Bearer
token to h5pyd , and not rely on predefined user credentials to obtain it .Is this possible (without touching h5pyd code) ?
Context: h5pyd is used in a Flask RESTfull application which supports multiple users, the bearer token is obtained by the application and is specific to the user; the token shall be passed to h5pyd ; the user passwords are not accessible (they are managed by а Keycloak instance).