idpass / idpass-lite-java

Java wrapper for idpass-lite, a library to create and interact with secure and biometrically-binding QR code identity cards
https://www.idpass.org/
Apache License 2.0
24 stars 2 forks source link

Improve API for CardDetails #12

Closed typelogic closed 3 years ago

typelogic commented 3 years ago

Currently, it is using an intermediary Map together with scaffold methods. The effect is that the client app loses a refined control when interrogating fields of CardDetails. For example, the dateOfBirth field could have only the year being set with month and day set to 0. The Map indirection miss-convert it to wrong date.

By exposing directly the CardDetails to the client API, the client can decide best what to do if only year is present. The client can also use the has-* protobuf-generated methods to check presence/absence of message fields.

typelogic commented 3 years ago

Fixed in https://github.com/idpass/idpass-lite-java/commit/c1c77c7b7d340e68ae38cc158d009bc5be53ab5e