google / android-fhir

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first healthcare applications using the HL7® FHIR® standard on Android.
https://google.github.io/android-fhir/
Apache License 2.0
465 stars 246 forks source link

Be able to configure the FHIR Server and a user/password for Demo App #2473

Closed icrc-fdeniger closed 3 months ago

icrc-fdeniger commented 3 months ago

Is your feature request related to a problem? Please describe. By default the fhir server https://hapi.fhir.org/baseR4/" is used without login. It should be great if developper can change the server and specify a another FHIR Server and use a login/pwd

Describe the solution you'd like Be able to configure these configuration in the file local.properties

Describe alternatives you've considered Fork and modify manually FhirApplication

Additional context Add any other context or screenshots about the feature request here.

Would you like to work on the issue? Why not

MJ1998 commented 3 months ago

Thank you for your interest in our demo app!

It sounds like you're ready to implement robust authentication! Our fhir-app-examples repository is the place to go, with working examples tailored to FHIR. The demo would be a great starting point. It uses the Android FHIR SDK, FHIR Info Gateway (for secure access), and FHIR Data Pipes – all part of Google's Open Health Stack (OHS).

See ohs.dev for more!

Let us know if you have any other questions @icrc-fdeniger.

Closing this ticket.

icrc-fdeniger commented 3 months ago

Hello @MJ1998, thanks for the link to the examples. My point was to be able to test directly the engine on a different FHIR Server without having to install the access gateway ( still wondering if the gateway is mandatory :) )

MJ1998 commented 3 months ago

Hey @icrc-fdeniger , sorry I missed this.

Got it ! Yes, we support authentication! You can integrate your own authentication system by providing your URL and an authenticator via the serverConfiguration.authenticator setting in FhirEngineConfiguration. For example in this demo I shared earlier, this is how we provide a custom authenticator - notice that LoginRespository is an extension of Authenticator interface.

Also you're right gateway is not mandatory.