openwallet-foundation-labs / identity-credential

Apache License 2.0
149 stars 76 forks source link

SecureAreaCredential and MdocCredential fixes. #588

Closed davidz25 closed 2 months ago

davidz25 commented 2 months ago

The previous commit which introduced a new hierarchy of Credential classes introduced a couple of small subtle bugs.

First problem was that MdocCredential.doctype wasn't read back properly. This manifested itself in an error when using the "Check for update" facility in the wallet app.

The second problem was that all SecureAreaCredential had the same alias. This is because Credential.identifier isn't assigned until it was added to the Document. This manifested itself in only a single credential being visible in the wallet app.

This PR fixes these problems.

Test: Manually tested with wallet app.