Open atulkakrana opened 4 years ago
@atulkakrana have you got any help on authenticate this? Also looking for the same.
we need this badly I was about to write an issue, also against azure services
thanks
I was also struggling to figure out, how to use user-password authentication with the fhirclient (specifically BasicAuth) until I came across the following stackoverflow answer.
According to this, it is also possible to pass username
and password
to the url like this:
http://user:passwd@www.server.com/index.html
I then changed my settings
-dictionary for the client initialization from:
settings = {
"app_id": "some_app_id",
"api_base": "https://my_fhir_server.com"}
smart = fhirclient.client.FHIRClient(settings=settings)
to
user = "username"
pw = "password"
settings = {
"app_id": "some_app_id",
"api_base": f"https://{user}:{pw}@my_fhir_server.com"}
smart = fhirclient.client.FHIRClient(settings=settings)
and it works as expected.
While this is a good enough workaround for my case, I only checked this for BasicAuth
. And this might not be the most secure solution, but I am no expert on this.
In any case, it would be great to officially address different authentication methods like mentioned in #91 .
@atulkakrana Do you have any update on this? Would love some help as I am facing the same issues
Hi, It will help a lot if you can add some examples for FHIR client (
client-py
) on how we can authenticate sessions/calls from Python? For example - how can we use authenticate to access FHIR API: https://synthea.mitre.org/fhir-api ??