Skip to content

Commit

Permalink
feat: sub = iss = did #1780
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Aug 14, 2023
1 parent 9659180 commit 75937b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,10 @@ class QRCodeScanCubit extends Cubit<QRCodeScanState> {
// ),
// ),
// );
} else if (state.uri.toString().startsWith('openid://') ||
state.uri.toString().startsWith('openid-vc://')) {
} else if (state.uri.toString().startsWith('openid://?') ||
state.uri.toString().startsWith('openid-vc://?')) {
/// ebsi v2 presentation
/// verifier side (siopv2) with request_uri
await verifyOIDC4VPAndSiopv2Jwt(state.uri);
} else {
emit(state.acceptHost(isRequestVerified: true));
Expand Down Expand Up @@ -402,13 +401,13 @@ class QRCodeScanCubit extends Cubit<QRCodeScanState> {
return;
}

if (state.uri.toString().startsWith('openid://')) {
if (state.uri.toString().startsWith('openid://?')) {
/// verifier side (OIDC4VP And siopv2) with request_uri
await launchOIDC4VPAndSiopV2WithRequestUriFlow(state.uri);
return;
}

if (state.uri.toString().startsWith('openid-vc://')) {
if (state.uri.toString().startsWith('openid-vc://?')) {
/// verifier side (siopv2) with request_uri
await launchSiopV2WithRequestUriFlow(state.uri);
return;
Expand Down
4 changes: 2 additions & 2 deletions packages/oidc4vc/lib/src/oidc4vc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,8 @@ class OIDC4VC {
'iat': DateTime.now().microsecondsSinceEpoch,
'aud': tokenParameters.audience, // devrait être verifier
'exp': DateTime.now().microsecondsSinceEpoch + 1000,
'sub': isSIOPV2Only ? tokenParameters.did : 'https://self-issued.me/v2',
'iss': isSIOPV2Only ? tokenParameters.did : 'https://self-issued.me/v2',
'sub': tokenParameters.did,
'iss': tokenParameters.did, //'https://self-issued.me/v2',
'nonce': tokenParameters.nonce,
};

Expand Down

0 comments on commit 75937b1

Please sign in to comment.