Skip to content

Commit

Permalink
feat: Handle error OIDC4VP #2027
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Oct 19, 2023
1 parent 8763027 commit c27e2dd
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ class QRCodeScanCubit extends Cubit<QRCodeScanState> {
}

if (registration != null) {
queryJson['registration'] = registration;
queryJson['registration'] =
registration is Map ? jsonEncode(registration) : registration;
}

final String queryString = Uri(queryParameters: queryJson).query;
Expand All @@ -553,6 +554,13 @@ class QRCodeScanCubit extends Cubit<QRCodeScanState> {
final keys = <String>[];
state.uri?.queryParameters.forEach((key, value) => keys.add(key));

if (keys.contains('claims')) {
/// claims is old standard
throw ResponseMessage(
message: ResponseString.RESPONSE_STRING_thisRequestIsNotSupported,
);
}

if (!keys.contains('response_type')) {
throw ResponseMessage(
data: {
Expand Down

0 comments on commit c27e2dd

Please sign in to comment.