Skip to content

Commit

Permalink
Merge branch 'main' into ALTME
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkbee1 committed Oct 25, 2024
2 parents 10d24bd + ed713f8 commit af76ad0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/oidc4vc/lib/src/oidc4vc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,7 @@ class OIDC4VC {
tokenParameters: issuerTokenParameters,
clientAuthentication: clientAuthentication,
cnonce: nonce,
iss: issuerTokenParameters.clientId,
);

credentialData['proof'] = {
Expand Down Expand Up @@ -1410,11 +1411,13 @@ class OIDC4VC {
Future<String> getIssuerJwt({
required IssuerTokenParameters tokenParameters,
required ClientAuthentication clientAuthentication,
required String iss,
String? cnonce,
}) async {
final iat = (DateTime.now().millisecondsSinceEpoch / 1000).round() - 30;

final payload = {
'iss': iss,
'iat': iat,
'aud': tokenParameters.issuer,
};
Expand Down Expand Up @@ -1600,7 +1603,7 @@ class OIDC4VC {
'aud': tokenParameters.audience,
'exp': iat + 1000,
'sub': tokenParameters.did,
//'iss': tokenParameters.did,
'iss': tokenParameters.did,
'vp': {
'@context': ['https://www.w3.org/2018/credentials/v1'],
'id': presentationId,
Expand Down Expand Up @@ -1705,7 +1708,7 @@ class OIDC4VC {
'aud': tokenParameters.audience, // devrait être verifier
'exp': iat + 1000,
'sub': issAndSub,
// 'iss': issAndSub,
'iss': issAndSub,
};

if (tokenParameters.nonce != null) {
Expand Down
1 change: 1 addition & 0 deletions packages/oidc4vc/test/src/oidc4vc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ void main() {
final issuerJwt = await oidc4vc.getIssuerJwt(
tokenParameters: tokenParameters,
clientAuthentication: ClientAuthentication.clientId,
iss: clientId,
cnonce: '2da2d506-0910-11ef-9e49-0a1628958560',
);

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: altme
description: AltMe Flutter App

version: 2.15.6+532
version: 2.15.7+533

publish_to: "none" # Remove this line if you wish to publish to pub.dev
environment:
Expand Down

0 comments on commit af76ad0

Please sign in to comment.