Comments (6)
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.
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.
@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.
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.
@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.
@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)
- Improve initial load for calculated-expression HOT 1
- Open choice missing string value HOT 5
- Improve Readability and Maintainability of Data Purge Function (purge()) HOT 1
- Expose an interface to db.withtransaction through FhirEngine
- Do you think it would be important to handle [WorkInfo.State#BLOCKED](https://developer.android.com/reference/androidx/work/WorkInfo.State#BLOCKED) status or defaulting to error would just be enough?
- support for UploadRequestGeneratorMode.UrlRequest in UploadStrategy (?) to support OpenMRS as FHIR Backend HOT 1
- refactor - Move Search Logic from Search.execute() to FhirEngine.search() HOT 2
- erroreneous docs - search method documentation
- Improve FhirEngine Search performance for sorting HOT 7
- 'SELECT' queries sometimes take too long to run HOT 6
- Custom Search Parameter does not Consider in x-fhir-query HOT 1
- Wrap FHIREngine API calls with "withContext(Dispatcher.IO) {}"
- Sync fails with 'too many SQL variables' in select HOT 3
- SQLite crashes with 'Expression tree is too large (maximum depth 1000)' HOT 3
- Update the repeatedGroup ui. HOT 3
- Add Distinct in SQL query instead of kotlin function in search query
- Previous button shows up on the first page
- Snapshot Packages are not published or visiblie HOT 3
- Update documentation for custom ui components
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-fhir.