toJson method
Implementation
Map<String, Object> toJson() => {
'version': route == PasskeyRoute.system ? 2 : 3,
if (route == PasskeyRoute.hardware) ...{
'route': 'hardware',
'verification': 'required',
'transports': transports,
},
'prf': 'webauthn-prf-v1',
'domain': domain,
'credentialId': _encode(credentialId),
'userId': _encode(userId),
'publicKeyCose': _encode(publicKeyCose),
'input': _encode(input),
'backupEligible': authenticatorState.backupEligible,
'backupState': authenticatorState.backupState,
'signCount': authenticatorState.signCount,
};