diff --git a/lib/services/connection/api_manager/mock_api.dart b/lib/services/connection/api_manager/mock_api.dart index 15e702553a..45ef84a3d6 100644 --- a/lib/services/connection/api_manager/mock_api.dart +++ b/lib/services/connection/api_manager/mock_api.dart @@ -13,6 +13,7 @@ import 'package:flutter_deriv_api/services/connection/api_manager/connection_inf import 'package:flutter_deriv_api/services/connection/api_manager/exceptions/api_manager_exception.dart'; import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/account/new_account_wallet_response.dart'; import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/cashier/cashier_payments_response.dart'; +import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/passkeys/passkeys_register_options_response.dart'; import 'package:flutter_deriv_api/services/connection/call_manager/base_call_manager.dart'; import 'package:flutter_deriv_api/services/connection/call_manager/exceptions/call_manager_exception.dart'; @@ -375,6 +376,8 @@ class MockAPI extends BaseAPI { return websiteStatusResponse; case 'wallet_migration': return walletMigrationResponse; + case 'passkeys_register_options': + return passkeysRegisterOptionsResponse; default: throw APIManagerException( diff --git a/lib/services/connection/api_manager/mock_data/passkeys/passkeys_register_options_response.dart b/lib/services/connection/api_manager/mock_data/passkeys/passkeys_register_options_response.dart new file mode 100644 index 0000000000..b51d9a515e --- /dev/null +++ b/lib/services/connection/api_manager/mock_data/passkeys/passkeys_register_options_response.dart @@ -0,0 +1,46 @@ +/// Wallet migration response mock data. +const String passkeysRegisterOptionsResponse = '''{ + "echo_req": { + "passkeys_register_options": 1 + }, + "msg_type": "passkeys_register_options", + "passkeys_register_options": { + "publicKey": { + "attestation": "direct", + "authenticatorSelection": { + "requireResidentKey": true, + "residentKey": "required", + "userVerification": "preferred" + }, + "challenge": "40gAmfy2FaUGwsV_VrxtvBgPa77dl8W6fFLxQf5WHMc", + "excludeCredentials": [], + "extensions": { + "credProps": true + }, + "pubKeyCredParams": [ + { + "alg": -8, + "type": "public-key" + }, + { + "alg": -7, + "type": "public-key" + }, + { + "alg": -257, + "type": "public-key" + } + ], + "rp": { + "id": "deriv.com", + "name": "Deriv" + }, + "timeout": 60000, + "user": { + "displayName": "bassam@deriv.com", + "id": 14, + "name": "bassam@deriv.com" + } + } + } +}''';