Skip to content

Commit

Permalink
feat: Add error for client id scheme #3210
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Dec 24, 2024
1 parent eb8ead2 commit f264c7f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/dashboard/qr_code/qr_code_scan/cubit/qr_code_scan_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,19 @@ class QRCodeScanCubit extends Cubit<QRCodeScanState> {
} else if (clientIdScheme == 'redirect_uri') {
/// no need to verify
return emit(state.acceptHost());
} else if (clientIdScheme == 'did') {
/// bypass
} else {
/// if client_id_scheme is not in the list -> did, redirect_uri,
/// verifier_attestation, x509_san_dns
final error = {
'error': 'invalid_request',
'error_description': 'Invalid client_id_scheme',
};
unawaited(
scanCubit.sendErrorToServer(uri: state.uri!, data: error),
);
throw ResponseMessage(data: error);
}

final VerificationType isVerified = await verifyEncodedData(
Expand Down

0 comments on commit f264c7f

Please sign in to comment.