diff --git a/lib/app/shared/helper_functions/helper_functions.dart b/lib/app/shared/helper_functions/helper_functions.dart index 2f18a2b40..0ae00d0ba 100644 --- a/lib/app/shared/helper_functions/helper_functions.dart +++ b/lib/app/shared/helper_functions/helper_functions.dart @@ -1604,7 +1604,7 @@ Future<(String?, String?, String?, String?)> getClientDetails({ did: '', // just added as it is required field mediaType: MediaType.basic, // just added as it is required field clientType: - ClientType.jwkThumbprint, // just added as it is required field + ClientType.p256JWKThumprint, // just added as it is required field proofHeaderType: customOidc4vcProfile.proofHeader, clientId: '', // just added as it is required field ); @@ -1619,7 +1619,7 @@ Future<(String?, String?, String?, String?)> getClientDetails({ .replaceAll('=', ''); switch (customOidc4vcProfile.clientType) { - case ClientType.jwkThumbprint: + case ClientType.p256JWKThumprint: clientId = tokenParameters.thumbprint; case ClientType.did: clientId = did; @@ -1630,7 +1630,7 @@ Future<(String?, String?, String?, String?)> getClientDetails({ /// only clientId case ClientAuthentication.clientId: switch (customOidc4vcProfile.clientType) { - case ClientType.jwkThumbprint: + case ClientType.p256JWKThumprint: clientId = tokenParameters.thumbprint; case ClientType.did: clientId = did; diff --git a/lib/chat_room/cubit/chat_room_cubit.dart b/lib/chat_room/cubit/chat_room_cubit.dart index e7e3596aa..fb2daa104 100644 --- a/lib/chat_room/cubit/chat_room_cubit.dart +++ b/lib/chat_room/cubit/chat_room_cubit.dart @@ -275,7 +275,7 @@ abstract class ChatRoomCubit extends Cubit { did: '', // just added as it is required field mediaType: MediaType.basic, // just added as it is required field clientType: - ClientType.jwkThumbprint, // just added as it is required field + ClientType.p256JWKThumprint, // just added as it is required field proofHeaderType: customOidc4vcProfile.proofHeader, clientId: customOidc4vcProfile.clientId ?? '', ); diff --git a/lib/dashboard/home/tab_bar/credentials/present/pick/selective_disclosure/view/selective_disclosure_pick_page.dart b/lib/dashboard/home/tab_bar/credentials/present/pick/selective_disclosure/view/selective_disclosure_pick_page.dart index b97e8e4b8..bd868cc05 100644 --- a/lib/dashboard/home/tab_bar/credentials/present/pick/selective_disclosure/view/selective_disclosure_pick_page.dart +++ b/lib/dashboard/home/tab_bar/credentials/present/pick/selective_disclosure/view/selective_disclosure_pick_page.dart @@ -243,7 +243,7 @@ class _SelectiveDisclosurePickViewState did: '', // just added as it is required field mediaType: MediaType.selectiveDisclosure, clientType: - ClientType.jwkThumbprint, // just added as it is required field + ClientType.p256JWKThumprint, // just added as it is required field proofHeaderType: customOidc4vcProfile.proofHeader, clientId: '', // just added as it is required field ); diff --git a/lib/scan/cubit/scan_cubit.dart b/lib/scan/cubit/scan_cubit.dart index aae9847a2..92e505ca6 100644 --- a/lib/scan/cubit/scan_cubit.dart +++ b/lib/scan/cubit/scan_cubit.dart @@ -579,7 +579,7 @@ class ScanCubit extends Cubit { did: '', // just added as it is required field mediaType: MediaType.basic, // just added as it is required field clientType: - ClientType.jwkThumbprint, // just added as it is required field + ClientType.p256JWKThumprint, // just added as it is required field proofHeaderType: customOidc4vcProfile.proofHeader, clientId: '', // just added as it is required field ); diff --git a/packages/oidc4vc/lib/src/client_type.dart b/packages/oidc4vc/lib/src/client_type.dart index 54be8048a..f313a04fc 100644 --- a/packages/oidc4vc/lib/src/client_type.dart +++ b/packages/oidc4vc/lib/src/client_type.dart @@ -2,7 +2,7 @@ import 'package:json_annotation/json_annotation.dart'; enum ClientType { @JsonValue('urn:ietf:params:oauth:jwk-thumbprint') - jwkThumbprint, + p256JWKThumprint, did, @@ -12,7 +12,7 @@ enum ClientType { extension ClientTypeX on ClientType { String get getTitle { switch (this) { - case ClientType.jwkThumbprint: + case ClientType.p256JWKThumprint: return 'P-256 JWK Thumbprint'; case ClientType.did: return 'DID'; diff --git a/packages/oidc4vc/lib/src/oidc4vc.dart b/packages/oidc4vc/lib/src/oidc4vc.dart index 6bef2cc7c..eaf2eb7c9 100644 --- a/packages/oidc4vc/lib/src/oidc4vc.dart +++ b/packages/oidc4vc/lib/src/oidc4vc.dart @@ -1519,7 +1519,7 @@ class OIDC4VC { var issAndSub = tokenParameters.thumbprint; switch (tokenParameters.clientType) { - case ClientType.jwkThumbprint: + case ClientType.p256JWKThumprint: issAndSub = tokenParameters.thumbprint; case ClientType.did: issAndSub = tokenParameters.did; @@ -1540,7 +1540,7 @@ class OIDC4VC { payload['nonce'] = tokenParameters.nonce!; } - if (tokenParameters.clientType == ClientType.jwkThumbprint) { + if (tokenParameters.clientType == ClientType.p256JWKThumprint) { payload['sub_jwk'] = tokenParameters.publicJWK; }