Comments (2)
Currently, there is no signal when the mdoc has completed transferring the device response.
In our implementations, a callback would be useful for performing an activity like terminating the session.
I have to check what the standard actually says but the general idea we've been working with in the ISO working group is that the mdoc reader might want to make multiple requests, in the same session. This is also why the standard has a session termination message which must be used (it's considered a bug if the mdoc or the mdoc reader just disconnects). In the case of just a single request it goes like this
- device engagement
- reader -> mdoc: SessionEstablishment which contains encrypted DeviceRequest (no status)
- mdoc -> reader: SessionData which contains encrypted DeviceResponse (no status)
- reader -> mdoc: SessionData which contains session termination (status 20), no data [1]
- mdoc disconnects
Our reference reader app actually used to hang up after a single request but we changed that so it keeps the connection open and allows multiple requests ... this was mostly to check that our reference mdoc app worked well with multiple requests. We actually found during the test events that many mdoc apps just disconnects w/o session termination after having served a single request which of course is wrong...
That said, I can still see value in conveying to the mdoc when all data has been sent (or at least handed off to the OS, there still might be some buffering at lower levels we can't control)... so something like onDeviceResponseSent()
makes sense... e.g. you may want to show a spinner and stop that spinner when the data has been sent. Maybe we'd even want progress reporting to fill up a status bar as the data is transferred [2].
Also, maybe instead of onDeviceResponseSent()
we could have the user pass a callback (e.g. interface with a progress reporting method) to sendDeviceResponse()
?
[1] : the standard also allows for a transport-specific way to terminate the session... right now only defined for BLE
[2] : although maybe progress callbacks would be overkill... I mean, after all we want data transfer to be fast. Might be nice anyway.
from identity-credential.
Yah, the spec as I recall was sort of vague on the point of which side should/can terminate, but certainly my intention is to send the termination message before disconnect, but leaving it up to implementation to override the default behaviour and send the "transport specific" termination if desired (which is supported in the library now). Either way, the idea is to make sure the current feature of allowing multiple serial requests in a session intact -- I did a smoke test of that with my branch and it does still work FWIW.
As for a progress callback...yah, I think it's a good point. I talked to a UX person I trust, and even if it's generally going to be a 1-2 second transfer (which seems somewhat typical with mDL required fields), they would want the option to present a progress indicator (it just makes things feel faster in their opinion). I also think the interface is a little better if we pass in a (nullable) progress listener to sendDeviceResponse()
instead of adding another required callback method which may be unused by many implementations. On the other hand, implementing progress indication for all transports might be tricky / fiddly / hard to test. Lemme take a stab and see where it goes...
from identity-credential.
Related Issues (20)
- Simple server-based issuance
- why there is a breaking change by updating the library with new identity-mdoc, storage related and key creation changes?
- FlowProcessor doesn't work with enums
- Migrate to from Timestamp to kotlinx.datetime.Instant, everywhere except identity-android-legacy HOT 1
- Basic wallet server infrastructure
- Build errors when making the identity-credential project
- Allow http connections to localhost for development
- Local dev performance issues
- Port issuing evidence collection flow to the server
- Argument names in the HPKE decryption function do not match the intended use.
- Add support for selfies as a verification method
- Handle when wallet server is unreachable
- Use PassphraseEntryField for German EID card
- German eID card proof and network connectivity
- PassphrasePrompt need title, body, and buttons HOT 2
- Detect facial poses, when recording a selfie
- The application crashes when you try to create a self signed document HOT 3
- Make Project and Build APKs fail on Linux.
- cannot perform over the internet verification with https://mdoc-reader-external.uc.r.appspot.com
- QR code generation fails if BT and BT Scanning are disabled. HOT 1
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 identity-credential.