Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre release PR #345

Merged
merged 33 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2f4f7fb
updated dependencies
rauljareno Jul 5, 2023
b69ccd6
updated injector
rauljareno Jul 5, 2023
3840dbd
updated polygonidlib to v2.1.1
rauljareno Jul 6, 2023
cac9f40
fixing selective disclosure
rauljareno Jul 7, 2023
cc560a4
fixing selective disclosure
rauljareno Jul 7, 2023
9ab8357
format fix
rauljareno Jul 7, 2023
4e35561
fix wrong proof type claims returned in the get claims use case
Jul 26, 2023
664c704
improve performance
Jul 31, 2023
c4fb61f
cache schema
Jul 31, 2023
51364dc
updated c-lib for iOS and Android
Jul 31, 2023
4e25541
added double as valid query value type
Jul 31, 2023
556267e
get schema with Dio and caching it, checking if result type Map or St…
Jul 31, 2023
4d441a0
added DateTime check on String query value
Aug 1, 2023
d287d11
fixed problem with nested keys
Aug 2, 2023
0744df3
added the method to clean schema cache manually
Aug 2, 2023
277a161
update ios libraries with ASM and parallelization, some fixes in ffas…
demonsh Aug 4, 2023
01d68ae
Merge branch 'fix/improve-performance-ios' into develop
Aug 7, 2023
544f928
logger() instead of print()
Aug 7, 2023
8aba45d
Feature/pid1102 error reporting system (#328)
plusema86 Aug 14, 2023
556b6e6
increment sdk version number
Aug 18, 2023
bf0b481
* hotfix bug with sembast [2] codec signature error
Oct 3, 2023
a552fc6
SDK improvements (#332)
plusema86 Oct 10, 2023
a48fc6c
added challenge to authenticate method, needed if we want to add to t…
Oct 13, 2023
177c9eb
Feature/new libpolygonid a (#333)
plusema86 Oct 17, 2023
83a19df
Merge branch 'main' into develop
Oct 17, 2023
fdfa4d6
Fix/clibs (#336)
plusema86 Oct 31, 2023
053bd83
cleaning and formatting
Oct 31, 2023
3418394
README updates (#335)
famousj Oct 31, 2023
fdcb07f
cleaning and formatting
Oct 31, 2023
4178d40
v2.2.8+1 release (#338) (#339)
plusema86 Oct 31, 2023
1c0c671
Update Docs link (#342)
cerberushades Nov 10, 2023
3cdb23d
fix: revocation status (#343)
plusema86 Nov 10, 2023
79e6da3
Merge branch 'main' into develop
plusema86 Nov 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.2.8+2
- Fixed protocol library method for revocation status check

## 2.2.8+1
- Fixed protocol libraries that caused issues with iOS devices

Expand Down
61 changes: 61 additions & 0 deletions IDEN3MESSAGE_PARSER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Iden3Message Parser

## Introduction

With the latest update, the content of the QR code provided by the Issuer or Verifier could be in three different formats:
- Url (iden3comm://?request_uri=)
- Base64 encoded (iden3comm://?i_m=)
- RAW Json format (json)

## Code Snippet
to parse the qr code content, you can use the following code snippet as an example:

```dart
class QrcodeParserUtils {
final PolygonIdSdk _polygonIdSdk;

QrcodeParserUtils(this._polygonIdSdk);

Future<Iden3MessageEntity> getIden3MessageFromQrCode(String message) async {
try {
String rawMessage = message;
if (message.startsWith("iden3comm://?i_m")) {
rawMessage = await _getMessageFromBase64(message);
}

if (message.startsWith("iden3comm://?request_uri")) {
rawMessage = await _getMessageFromRemote(message);
}

Iden3MessageEntity? _iden3Message =
await _polygonIdSdk.iden3comm.getIden3Message(message: rawMessage);
return _iden3Message;
} catch (error) {
throw Exception("Error while processing the QR code");
}
}

Future<String> _getMessageFromRemote(String message) async {
try {
message = message.replaceAll("iden3comm://?request_uri=", "");
http.Response response = await http.get(Uri.parse(message));
if (response.statusCode != 200) {
throw Exception("Error while getting the message from the remote");
}
return response.body;
} catch (error) {
throw Exception("Error while getting the message from the remote");
}
}

Future<String> _getMessageFromBase64(String message) async {
try {
message = message.replaceAll("iden3comm://?i_m=", "");
String decodedMessage = String.fromCharCodes(base64.decode(message));
return decodedMessage;
} catch (error) {
throw Exception("Error while getting the message from the base64");
}
}
}
```
Loading
Loading