toJson method
Converts this instance to a JSON map.
Implementation
Map<String, dynamic> toJson() {
return {
'challenge': challenge,
'rp': relyingParty.toJson(),
'user': user.toJson(),
if (pubKeyCredParams != null)
'pubKeyCredParams': pubKeyCredParams!.map((e) => e.toJson()).toList(),
if (timeout != null) 'timeout': timeout,
if (excludeCredentials.isNotEmpty)
'excludeCredentials':
excludeCredentials.map((e) => e.toJson()).toList(),
if (authSelectionType != null)
'authenticatorSelection': authSelectionType!.toJson(),
if (attestation != null) 'attestation': attestation,
};
}