Giter VIP home page Giter VIP logo

Comments (6)

MJ1998 avatar MJ1998 commented on June 22, 2024 1

Thanks for your interest in this @parthfloyd

Actually you can provide your own authenticator via ServerConfiguration.

This is what I was looking for in the developer's call. Let me know if it makes sense to you.

from android-fhir.

MJ1998 avatar MJ1998 commented on June 22, 2024 1

You are right.
At first I thought the application can provide their own implementation of HttpAuthenticationMethod but its a sealed class.

I am working on probable solutions. I'll get back to you.

Also, how much of a priority is this issue for you? Is it a blocker ?

from android-fhir.

parthfloyd avatar parthfloyd commented on June 22, 2024 1

@MJ1998 That's great, Thank you so much!
Yes its P1 for us, since its for the patient save. Although it's not a blocker since we've a temporary workaround in a fork, but with this change we can stick to the official repository.

from android-fhir.

jingtang10 avatar jingtang10 commented on June 22, 2024 1

thanks for raising this @parthfloyd. i think we can do this, but i don't know if we should do this.

normally cookies are used for maintaining session on client side, but for restful apis, there isn't the concept of session, so they should be used sparingly. in your case i understand it's used as a seed for a unique id, if this is the case, should you be sending it as part of your http request payload?

from android-fhir.

parthfloyd avatar parthfloyd commented on June 22, 2024 1

@jingtang10 Thank you so much for looking into this!
I agree ideally we shouldn't do this. Hence, we are changing approach & proceeding with change in the backend.

For context, even though the locationId is supplied in the payload, the current implementation of backend expects it to be passed via cookie. We are looking forward to implement change in the backend for the implementation, to accept locationId via the request payload.

cc: @icrc-fdeniger , @icrc-psousa, @icrc-jofrancisco

from android-fhir.

parthfloyd avatar parthfloyd commented on June 22, 2024

@MJ1998 Thanks a ton for looking into this! Actually we are using authenticator for providing the bearer token in header in the application (It's based on FHIR app examples: demo)

However our requirement is to add cookie in the header with the sessionID which indicates the user's location. We've this requirement to due to the way this unique openMRS identifier generation is handled in the backend.

This commit <MainActivity.kt in particular> gives more context on this: icrc/openmrs-android-fhir@e21843d#diff-842352ae1f3d0f4ed093a1c6cbdc3d4a8cac0ba09f6cb56cb8c3010ca7e4b78cR62

Let me know if it makes sense for networkConfiguration to have cookie support in particular or in general a customerHeader support, incase some backend application have similar requirements. or If I'm off track and we can provide cookie via authenticator.

Let me know your thoughts on this, I'd be down to work on implementation if required.

from android-fhir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.